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.
code: def __init__(
      self,
      module: torch.fx.GraphModule,
      sample_input: Tensors,
      compare_fn: Callable[
          [TensorOrTensors, TensorOrTensors, Names], Tuple[float, bool]
      ],
      settings: _MinimizerSettingBase,
      module_exporter: Optional[
          Callable[
              [List[torch.Tensor], torch.fx.GraphModule, str], None
          ]
      ] = None,
  ):
      assert isinstance(module, torch.fx.GraphModule)
  
      self.module = module
      self.sample_input = sample_input
      self.compare_fn = compare_fn
      self.module_exporter = module_exporter
      self.settings = settings
  
      # Stores outputs of run_a function
      self.a_outputs: Dict[str, Any] = {}
  
      # Stores outputs of run_b function
      self.b_outputs: Dict[str, Any] = {}
  
      # Stores the results of compare_fn
      self.results: Dict[Any, Any] = {}
  
      # Stores the report for the runs
      self.reports: List[List[str]] = []
  
      # Current iteration
      self.iteration: int = 0
  
      callable_nodes = {
          node
          for node in self.module.graph.nodes
          if node.op in CALLABLE_NODE_OPS
      }
      ShapeProp(self.module).propagate(*self.sample_input)
      self.fusions = FxNetAccFusionsFinder(
          self.module, callable_nodes
      )()
  
      # Check if number of input in sample_input matches the number of placeholders
      placeholders = [
          node.name
          for node in self.module.graph.nodes
          if node.op == "placeholder"
      ]
      assert len(placeholders) == len(self.sample_input)
  
      # Store sample_input
      for i, name in enumerate(placeholders):
          self.a_outputs[name] = sample_input[i]
          self.b_outputs[name] = sample_input[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 1 to create a new _MinimizerBase object  with example: obj = _MinimizerBase(module, sample_input, compare_fn, settings, module_exporter)