class_docstr: Iterates through the graph of gm, starting with the output nodes
  and continuing backwards.
  1. Returns matchable subgraphs, in order. A subgraph is defined by
     (start_node, end_node).
  2. Skips over non-matchable subgraphs
class_docstr_tok: ["Iterates","through","the","graph","of","gm",",","starting","with","the","output","nodes","and","continuing","backwards",".","1",".","Returns","matchable","subgraphs",",","in","order",".","A","subgraph","is","defined","by","(","start_node",",","end_node",")",".","2",".","Skips","over","non-matchable","subgraphs"]
docstr: Adds all of the nodes in this arg to the stack, properly navigating
  through list, dicts and tuples.
docstr_tok: ["Adds","all","of","the","nodes","in","this","arg","to","the","stack",",","properly","navigating","through","list",",","dicts","and","tuples","."]
code: def _recursively_add_node_arg_to_stack(self, arg: Any) -> None:
      """
      Adds all of the nodes in this arg to the stack, properly navigating
      through list, dicts and tuples.
      """
      if isinstance(arg, Node):
          self.stack.append(arg)
      elif (
          isinstance(arg, torch.fx.immutable_collections.immutable_list)
          or type(arg) is tuple
      ):
          for inner_arg in arg:
              self._recursively_add_node_arg_to_stack(inner_arg)
      elif isinstance(
          arg, torch.fx.immutable_collections.immutable_dict
      ):
          for value in arg.values():
              self._recursively_add_node_arg_to_stack(value)
  
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 the _NSGraphMatchableSubgraphsIterator obj's underlying member method code with example usage: obj._recursively_add_node_arg_to_stack(arg) without return types