class_docstr: A representation with message passing with uses categorical relation type information.
  
  The message passing layers of this module internally handle the categorical relation type information
  via an `edge_type` input, e.g., :class:`torch_geometric.nn.conv.RGCNConv`, or
  :class:`torch_geometric.nn.conv.RGATConv`.
  
  The following example creates a one-layer RGCN using the basis decomposition:
  
  .. code-block:: python
  
      from pykeen.datasets import get_dataset
  
      embedding_dim = 64
      dataset = get_dataset(dataset="nations")
      r = TypedMessagePassingRepresentation(
          triples_factory=dataset.training,
          base_kwargs=dict(shape=embedding_dim),
          layers="rgcn",
          layers_kwargs=dict(
              in_channels=embedding_dim,
              out_channels=embedding_dim,
              num_bases=2,
              num_relations=dataset.num_relations,
          ),
      )
  
  ---
  name: Typed Message Passing
code: def pass_messages(
      self,
      x: torch.FloatTensor,
      edge_index: torch.LongTensor,
      edge_mask: Optional[torch.BoolTensor] = None,
  ) -> torch.FloatTensor:  # noqa: D102
      edge_type = self._get_edge_type(edge_mask=edge_mask)
      for layer, activation in zip(self.layers, self.activations):
          x = activation(
              layer(x, edge_index=edge_index, edge_type=edge_type)
          )
      return x
  
imports: from abc import ABC, abstractmethod
  from typing import Collection, Literal, Optional, Sequence
  import torch
  from class_resolver import ClassResolver, HintOrType, OneOrManyHintOrType, OneOrManyOptionalKwargs, OptionalKwargs
  from class_resolver.contrib.torch import activation_resolver
  from docdata import parse_docdata
  from torch import nn
  from .representation import Representation
  from .utils import ShapeError
  from ..triples.triples_factory import CoreTriplesFactory
  from ..typing import OneOrSequence
  from ..utils import get_edge_index, upgrade_to_sequence
label_desc: Use image node_id 3 for calling the TypedMessagePassingRepresentation obj's underlying member method code with example usage: obj.pass_messages(x, edge_index, edge_mask) and returns: x