code: def call_global_pooling_module(
      self, node: Node, target: Any, name: str
  ):
      # Add calls to node type-wise `GlobalPooling` modules and aggregate
      # the outputs to graph type-wise embeddings afterwards.
      self.graph.inserting_after(node)
      for key in self.metadata[0]:
          args, kwargs = self.map_args_kwargs(node, key)
          out = self.graph.create_node(
              "call_module",
              target=f"{target}.{key2str(key)}",
              args=args,
              kwargs=kwargs,
              name=f"{node.name}__{key2str(key)}",
          )
          self.graph.inserting_after(out)
  
      # Perform node-wise aggregation.
      queue = deque(
          [f"{node.name}__{key2str(key)}" for key in self.metadata[0]]
      )
      i = 1
      while len(queue) >= 2:
          key1, key2 = queue.popleft(), queue.popleft()
          args = (self.find_by_name(key1), self.find_by_name(key2))
          out = self.graph.create_node(
              "call_function",
              target=self.aggrs[self.aggr],
              args=args,
              name=f"{name}_{i}",
          )
          self.graph.inserting_after(out)
          queue.append(f"{name}_{i}")
          i += 1
  
      if self.aggr == "mean":
          key = queue.popleft()
          out = self.graph.create_node(
              "call_function",
              target=torch.div,
              args=(self.find_by_name(key), len(self.metadata[0])),
              name=f"{name}_{i}",
          )
          self.graph.inserting_after(out)
      self.replace_all_uses_with(node, out)
  
imports: import copy
  import warnings
  from collections import defaultdict, deque
  from typing import Any, Dict, Optional, Tuple, Union
  import torch
  from torch.nn import Module
  from torch_geometric.nn.dense.linear import is_uninitialized_parameter
  from torch_geometric.nn.fx import Transformer, get_submodule
  from torch_geometric.typing import EdgeType, Metadata, NodeType
  from torch_geometric.utils.hetero import check_add_self_loops, get_unused_node_types
label_desc: Use image node_id 6 for calling the ToHeteroTransformer obj's underlying member method code with example usage: obj.call_global_pooling_module(node, target, name) without return types