class_docstr: This class is used to automatically find problematic nodes in a model. It takes a FX
  graphmodule and generate some submodules while traverse the graph. Then two functions
  `run_a` and `run_b` will be used to run the same submodule and a function `compare_fn`
  will be used to compare the results.
  
  Currently we provides two ways to traverse the graph and generate submodules.
      1. Sequential traversal: this will traverse the graph node by node and generate
         one submodule with one sigle node.
      2. Binary searching: this will do a binary search style traversal on the graph.
  
  For internal Users, a guide can be found here https://fb.quip.com/HDtuAgiKGfkP.
docstr: Store the outputs of self.run_a() and self.run_b() into self.a_outputs and
  self.b_outputs, so that we can use them when execute preceding nodes that
  use those outputs as inputs.
  
  Args:
      a_result: Output of self.run_a(). Could be a tensor or tensors.
      b_result: Output of self.run_b(). Could be a tensor or tensors.
      submodule: The module that generates a_result and b_result.
code: def _store_outputs(
      self,
      a_result: TensorOrTensors,
      b_result: TensorOrTensors,
      submodule: torch.fx.GraphModule,
  ):
      """
      Store the outputs of self.run_a() and self.run_b() into self.a_outputs and
      self.b_outputs, so that we can use them when execute preceding nodes that
      use those outputs as inputs.
  
      Args:
          a_result: Output of self.run_a(). Could be a tensor or tensors.
          b_result: Output of self.run_b(). Could be a tensor or tensors.
          submodule: The module that generates a_result and b_result.
      """
      output_node = next(
          node for node in submodule.graph.nodes if node.op == "output"
      )
  
      # Only one output
      if isinstance(output_node.args[0], torch.fx.Node):
          self.a_outputs[output_node.args[0].name] = a_result
          self.b_outputs[output_node.args[0].name] = b_result
      # Multiple outputs
      else:
          for i, arg in enumerate(output_node.args[0]):
              self.a_outputs[arg.name] = a_result[i]
              self.b_outputs[arg.name] = b_result[i]
  
imports: import logging
  from dataclasses import dataclass
  from typing import Any, Callable, Dict, List, Optional, Tuple
  import torch
  import torch.fx
  from torch.fx._compatibility import compatibility
  from torch.fx.node import map_arg
  from .shape_prop import ShapeProp
  from .split_utils import split_by_tags
  from .tools_common import CALLABLE_NODE_OPS, FxNetAccFusionsFinder, Names, NodeList, NodeSet, TensorOrTensors, Tensors
label_desc: Use image node_id 4 for calling the _MinimizerBase obj's underlying member method code with example usage: obj._store_outputs(a_result, b_result, submodule) without return types