class_docstr: Extends SubgraphMatcher to support querying the matched subgraph nodes through node name,
  this requires pattern to have specific format (returning and additional dictionary at the output,
  that has node name as key, and the node in the pattern graph as value, see Example for more details)
  
  Difference with SubgraphMatcher is that it takes a `pattern_gm` GraphModule as input during
  initialization since we need to modify the graph (which requires `recompile` the GraphModule)
  
  Example::
      def pattern(x, weight):
          conv = F.conv2d(x, weight)
          relu = F.relu(conv)
          return relu, {"conv": conv, "relu": relu}
  
      def target_graph(x, weight):
          conv = F.conv2d(x, weight)
          relu = F.relu(conv)
          relu *= 2
          return relu
  
      pattern_gm = capture_pre_autograd_graph(pattern, example_inputs)
      target_gm = capture_pre_autograd_graph(target_graph, example_inputs)
      matcher = SubgraphMatcherWithNameNodeMap(pattern_gm)
      matches = matcher.match(target_gm)
      for match in matches:
          match.name_node_map["conv"].meta["annotation"] = ...
code: def __init__(
      self,
      pattern_gm: GraphModule,
      match_output: bool = False,
      match_placeholder: bool = False,
      remove_overlapping_matches: bool = True,
      ignore_literals: bool = False,
  ) -> None:
      pattern_gm, name_node_map = _split_to_graph_and_name_node_map(
          pattern_gm
      )
      self.name_node_map = name_node_map
      super().__init__(
          pattern_gm.graph,
          match_output,
          match_placeholder,
          remove_overlapping_matches,
          ignore_literals,
      )
  
file_path: pytorch/torch/fx/passes/utils/matcher_with_name_node_map_utils.py
imports: from typing import Dict, List, Tuple
  from torch.fx import Graph, GraphModule, Node
  from torch.fx._compatibility import compatibility
  from .matcher_utils import InternalMatch, SubgraphMatcher
label_desc: Use image node_id 1 to create a new SubgraphMatcherWithNameNodeMap object from inherited base classes: SubgraphMatcher with example: obj = SubgraphMatcherWithNameNodeMap(pattern_gm, match_output, match_placeholder, remove_overlapping_matches, ignore_literals)