class_docstr: Splits a GraphModule into sub-GraphModules for execution on CPU or the accelerator.
  Output is a GraphModule with supported and unsupported operators grouped into as few sub-GraphModules as possible.
  Assumes that only "call_module", "call_function" and "call_method" from FX IR can potentially be executed on the accelerator.
  
  Given the following graph:
        ==> b ==>
      //         \
     a             d
      \         //
        ==> c ==>
  
  class SimpleModule(torch.nn.Module):
      def forward(self, a):
          b = torch.sin(a)
          c = torch.cos(a)
          d = b + c
          return d
  
  and providing "operator_support" that indicates that 'b' and 'c' can be executed on the accelerator,
  we will get the following split result:
  
  main:
  def forward(self, a):
      run_on_acc_0_0 = self._run_on_acc_0_0(a)
      getitem = run_on_acc_0_0[0]
      getitem_1 = run_on_acc_0_0[1]
      run_on_cpu_1_1 = self._run_on_cpu_1_1(getitem, getitem_1)
      return run_on_cpu_1_1
  
  _run_on_acc_0_0:
  def forward(self, a):
      sin_1 = torch.sin(a)
      cos_1 = torch.cos(a)
      return (sin_1, cos_1)
  
  _run_on_cpu_1_1:
  def forward(self, sin_1, cos_1):
      add_1 = sin_1 + cos_1
      return add_1
class_docstr_tok: ["Splits","a","GraphModule","into","sub-GraphModules","for","execution","on","CPU","or","the","accelerator",".","Output","is","a","GraphModule","with","supported","and","unsupported","operators","grouped","into","as","few","sub-GraphModules","as","possible",".","Assumes","that","only","``","call_module","''",",","``","call_function","''","and","``","call_method","''","from","FX","IR","can","potentially","be","executed","on","the","accelerator",".","Given","the","following","graph",":","==",">","b","==",">","\/\/","\\","a","d","\\","\/\/","==",">","c","==",">","class","SimpleModule","(","torch.nn.Module",")",":","def","forward","(","self",",","a",")",":","b","=","torch.sin","(","a",")","c","=","torch.cos","(","a",")","d","=","b","+","c","return","d","and","providing","``","operator_support","''","that","indicates","that","'","b","'","and","'","c","'","can","be","executed","on","the","accelerator",",","we","will","get","the","following","split","result",":","main",":","def","forward","(","self",",","a",")",":","run_on_acc_0_0","=","self._run_on_acc_0_0","(","a",")","getitem","=","run_on_acc_0_0","[","0","]","getitem_1","=","run_on_acc_0_0","[","1","]","run_on_cpu_1_1","=","self._run_on_cpu_1_1","(","getitem",",","getitem_1",")","return","run_on_cpu_1_1","_run_on_acc_0_0",":","def","forward","(","self",",","a",")",":","sin_1","=","torch.sin","(","a",")","cos_1","=","torch.cos","(","a",")","return","(","sin_1",",","cos_1",")","_run_on_cpu_1_1",":","def","forward","(","self",",","sin_1",",","cos_1",")",":","add_1","=","sin_1","+","cos_1","return","add_1"]
docstr: Builds a graph of node dependencies. Leaf nodes don't have any
  dependencies and the "output" node doesn't have nodes depending on it.
  
  Resulting graph has only direct dependencies, i.e. there are no
  transitive dependencies.
docstr_tok: ["Builds","a","graph","of","node","dependencies",".","Leaf","nodes","do","n't","have","any","dependencies","and","the","``","output","''","node","does","n't","have","nodes","depending","on","it",".","Resulting","graph","has","only","direct","dependencies",",","i.e",".","there","are","no","transitive","dependencies","."]
code: def find_deps(self) -> Dict[torch.fx.Node, NodeSet]:
      """
      Builds a graph of node dependencies. Leaf nodes don't have any
      dependencies and the "output" node doesn't have nodes depending on it.
  
      Resulting graph has only direct dependencies, i.e. there are no
      transitive dependencies.
      """
      deps: Dict[torch.fx.Node, NodeSet] = defaultdict(set)
      for node in self.module.graph.nodes:
          if node.op not in CALLABLE_NODE_OPS:
              continue
  
          for user in node.users:
              if user.op != "output":
                  deps[user].add(node)
      return deps
  
imports: import argparse
  import copy
  from collections import defaultdict
  from dataclasses import dataclass
  from typing import NamedTuple, Sequence, Iterable, Any, List, Dict, Optional, Tuple
  import logging
  import torch
  from torch.fx.passes.graph_manipulation import get_size_of_node
  from torch.fx.node import map_arg
  from torch.fx._compatibility import compatibility
  from .operator_support import get_node_target, OperatorSupportBase
  from .graph_drawer import FxGraphDrawer
  from .shape_prop import ShapeProp
  from .split_utils import split_by_tags
  from .tools_common import FxNetAccFusionsFinder, CALLABLE_NODE_OPS, Tensors, NodeList, NodeSet, is_node_output_tensor
label_desc: Use image node_id 3 for calling the _SplitterBase obj's underlying member method code with example usage: obj.find_deps() and returns: deps