code: def apply_match(
      modules: Dict[str, nn.ModuleDict],
      pattern: Union[Tuple[Any], Any],
      node: Node,
      matched_node_pattern: List[Node],
  ) -> Optional[List[Node]]:
      r"""
      This function will return the matched nodes if the pattern matches the node given
      If there is no match, it will return None
      """
      if isinstance(pattern, tuple):
          if len(pattern) == 1:
              if _match(modules, node, pattern[0]):
                  return matched_node_pattern + [node]
  
          first, *rest = pattern
          if _match(modules, node, first):
              if rest is None:
                  return matched_node_pattern + [node]
  
              for user in node.users:
                  return apply_match(
                      modules,
                      tuple(rest),
                      user,
                      matched_node_pattern + [node],
                  )
      elif _match(modules, node, pattern):
          return [node]
      return None
  
file_path: pytorch/torch/ao/pruning/_experimental/pruner/match_utils.py
imports: import torch
  from torch import nn
  from torch.ao.quantization.utils import MatchAllNode
  from torch.fx import Node
  from torch.nn.utils import parametrize
  from typing import Any, Dict, List, Optional, Tuple, Union
label_desc: Use image node_id 2 for calling a global function with example usage: apply_match(modules, pattern, node, matched_node_pattern) and returns: None, list, unknown, unknown, apply_match