Invariant Layers for Graphs with Nodes of Different Types