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: Split self.module so that one submodule consists of `nodes` and only `nodes`.
  
  Args:
      nodes: Nodes that we want to include in the minimize submodule.
  
  Returns:
      split_module (torch.fx.GraphModule): the module after split.
      submodule_name (str): the name of the submodule that consists of `nodes`.
code: def _build_submodule(
      self, nodes: NodeSet
  ) -> Tuple[torch.fx.GraphModule, str]:
      """
      Split self.module so that one submodule consists of `nodes` and only `nodes`.
  
      Args:
          nodes: Nodes that we want to include in the minimize submodule.
  
      Returns:
          split_module (torch.fx.GraphModule): the module after split.
          submodule_name (str): the name of the submodule that consists of `nodes`.
      """
      # Color provided nodes
      self._tag_nodes(nodes)
  
      # Split module based on coloring
      split_module = split_by_tags(
          self.module, ["main_0", "minimize", "main_1"]
      )
  
      # Find submodule containing colored nodes
      submodule_name: str = ""
      for child_name, _ in split_module.named_children():
          # Skip submodules we're not interested in at the moment
          if "minimize" not in child_name:
              continue
  
          if submodule_name == "":
              submodule_name = child_name
          else:
              raise FxNetMinimizerBadModuleError(
                  f"Expected only one minimize submodule with nodes {nodes}"
              )
  
      if submodule_name == "":
          raise FxNetMinimizerBadModuleError(
              f"Minimize submodule was not found with nodes {nodes}"
          )
  
      return split_module, submodule_name
  
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 7 for calling the _MinimizerBase obj's underlying member method code with example usage: obj._build_submodule(nodes) and returns: split_module,  submodule_name