class_docstr: A representation with message passing with uses edge features obtained from relation representations.
  
  It (re-)uses a representation layer for relations to obtain edge features, which are then utilized
  by appropriate message passing layers, e.g., :class:`torch_geometric.nn.conv.GMMConv`, or
  :class:`torch_geometric.nn.conv.GATConv`. We further allow a (shared) transformation of edge features
  between layers.
  
  The following example creates a two-layer GAT on top of the base representations:
  
  
  .. code-block:: python
  
      from pykeen.datasets import get_dataset
  
      embedding_dim = 64
      dataset = get_dataset(dataset="nations")
      r = FeaturizedMessagePassingRepresentation(
          triples_factory=dataset.training,
          base_kwargs=dict(shape=embedding_dim),
          relation_representation_kwargs=dict(
              shape=embedding_dim,
          ),
          layers="gat",
          layers_kwargs=dict(
              in_channels=embedding_dim,
              out_channels=embedding_dim,
              edge_dim=embedding_dim,  # should match relation dim
          ),
      )
  
  ---
  name: Featurized 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)
      # get initial relation representations
      x_rel = self.relation_representation(indices=None)
      n_layer = len(self.layers)
      for i, (layer, activation) in enumerate(
          zip(self.layers, self.activations)
      ):
          # select edge attributes from relation representations according to relation type
          edge_attr = x_rel[edge_type]
          # perform message passing
          x = activation(
              layer(x, edge_index=edge_index, edge_attr=edge_attr)
          )
          # apply relation transformation, if necessary
          if (
              self.relation_transformation is not None
              and i < n_layer - 1
          ):
              x_rel = self.relation_transformation(x_rel)
      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 2 for calling the FeaturizedMessagePassingRepresentation obj's underlying member method code with example usage: obj.pass_messages(x, edge_index, edge_mask) and returns: x