code: def compare_graphs(left: Graph, right: Graph) -> bool:
      """
      Return True if two graphs are identical, i.e they
          - have the same number of outputs in the same order
          - have the same number of inputs in the same order
          - have the same set of nodes, and identical connectivity
      """
  
      matcher = SubgraphMatcher(
          left, match_output=True, match_placeholder=True
      )
      matches = matcher.match(right)
  
      return len(matches) > 0
  
file_path: pytorch/torch/fx/passes/utils/common.py
imports: from typing import Dict, Tuple
  from torch.fx._compatibility import compatibility
  from torch.fx.graph import Graph
  from torch.fx.graph_module import GraphModule
  from torch.fx.passes.utils.matcher_utils import SubgraphMatcher
  from torch.nn import Module
label_desc: Use image node_id 2 for calling a global function with example usage: compare_graphs(left, right) and returns: unknown