code: def matches_module_function_pattern(
      pattern: Tuple[Type[torch.nn.modules.Module], Callable[..., Any]],
      node: torch.fx.node.Node,
      modules: Dict[str, torch.nn.modules.Module],
  ) -> bool:
      if len(node.args) == 0:
          return False
      if not isinstance(node.args[0], torch.fx.Node) or not isinstance(
          node, torch.fx.Node
      ):
          return False
      # the first node is call_module
      if node.args[0].op != "call_module":
          return False
      if not isinstance(node.args[0].target, str):
          return False
      if node.args[0].target not in modules:
          return False
      if type(modules[node.args[0].target]) is not pattern[0]:
          return False
      # the second node is call_function or call_method
      if node.op != "call_function" and node.op != "call_method":
          return False
      if node.target != pattern[1]:
          return False
      # make sure node.args[0] output is only used by current node.
      if len(node.args[0].users) > 1:
          return False
      return True
  
file_path: pytorch/torch/_inductor/fx_utils.py
imports: from collections import defaultdict
  from typing import Any, Callable, DefaultDict, Dict, Optional, Tuple, Type
  import torch
  import torch.fx
  from torch.fx.experimental.symbolic_shapes import statically_known_true, sym_eq
  from torch.utils import _pytree
  from torch.utils._pytree import tree_map
  from .virtualized import V
label_desc: Use image node_id 1 for calling a global function with example usage: matches_module_function_pattern(pattern, node, modules) and returns: True, False, False, False, False, False, False, False, False, False