code: def _get_node_target_type(
      node: Node, gm: GraphModule
  ) -> Optional[NSNodeTargetType]:
      if node.op in ("call_function", "call_method"):
          return node.target
      elif node.op == "call_module":
          assert isinstance(node.target, str)
          mod = getattr_from_fqn(gm, node.target)
          return type(mod)
      return None
  
imports: import collections
  import enum
  import torch
  from torch.fx import GraphModule
  from torch.fx.graph import Graph, Node
  from torch.ao.quantization.utils import getattr_from_fqn
  from .ns_types import NSSubgraph, NSNodeTargetType
  from .mappings import get_base_name_to_sets_of_related_ops, get_unmatchable_types_map
  from .pattern_utils import get_type_a_related_to_b, get_reversed_fusions, end_node_matches_reversed_fusion
  from torch.ao.quantization import ObserverBase, FakeQuantizeBase
  from typing import Dict, Tuple, List, Optional, Set, Any
label_desc: Use image node_id 4 for calling a global function with example usage: _get_node_target_type(node, gm) and returns: None, node, type