class_docstr: The GripNet model.
  
  Args:
      supergraph (SuperGraph): the supergraph.
  
  Reference:
      Xu, H., Sang, S., Bai, P., Li, R., Yang, L. and Lu, H., 2022. GripNet: Graph Information
      Propagation on Supergraph for Heterogeneous Graphs. Pattern Recognition, p.108973.
class_docstr_tok: ["The","GripNet","model",".","Args",":","supergraph","(","SuperGraph",")",":","the","supergraph",".","Reference",":","Xu",",","H.",",","Sang",",","S.",",","Bai",",","P.",",","Li",",","R.",",","Yang",",","L.","and","Lu",",","H.",",","2022",".","GripNet",":","Graph","Information","Propagation","on","Supergraph","for","Heterogeneous","Graphs",".","Pattern","Recognition",",","p.108973","."]
code: def __forward_supervertex__(self, supervertex_name: str, mode: str):
      supervertex = self.supergraph.supervertex_dict[supervertex_name]
      model = self.supervertex_module_dict[supervertex_name]
  
      # internal feature layer
      x = torch.matmul(supervertex.node_feat, model[-1].embedding)
  
      # external feature aggregation layers
      if mode == "add":
          for idx in range(len(supervertex.in_supervertex_list)):
              parent_name = supervertex.in_supervertex_list[idx]
              parent_x = self.out_embed_dict[parent_name]
              superedge = self.supergraph.superedge_dict[
                  (parent_name, supervertex_name)
              ]
  
              x += model[idx](
                  parent_x, superedge.edge_index, superedge.edge_weight
              )
      else:
          tmp = [x]
          for idx in range(len(supervertex.in_supervertex_list)):
              parent_name = supervertex.in_supervertex_list[idx]
              parent_x = self.out_embed_dict[parent_name]
              superedge = self.supergraph.superedge_dict[
                  (parent_name, supervertex_name)
              ]
  
              tmp.append(
                  model[idx](
                      parent_x,
                      superedge.edge_index,
                      superedge.edge_weight,
                  )
              )
          x = torch.cat(tmp, dim=1)
  
      # internal feature aggregation layers
      if supervertex.num_edge_type > 1:
          x = model[-1](
              x,
              supervertex.edge_index,
              supervertex.edge_type,
              supervertex.range_list,
              supervertex.edge_weight,
          )
      else:
          x = model[-1](
              x, supervertex.edge_index, supervertex.edge_weight
          )
  
      self.out_embed_dict[supervertex_name] = x
  
imports: import logging
  from typing import Dict
  import torch
  import torch.nn.functional
  from torch.nn import Module
  from kale.embed.gcn import GCNEncoderLayer, RGCNEncoderLayer
  from kale.prepdata.supergraph_construct import SuperGraph, SuperVertex, SuperVertexParaSetting
label_desc: Use image node_id 7 for calling the GripNet obj's underlying member method code with example usage: obj.__forward_supervertex__(supervertex_name, mode) without return types