class_docstr: Base handler class for the quantizer patterns
      
docstr: Records pattern information in __init__, which will be used
  in convert
docstr_tok: ["Records","pattern","information","in","__init__",",","which","will","be","used","in","convert"]
code: def __init__(
      self,
      node_pattern: NodePattern,
      modules: Dict[str, torch.nn.Module],
      root_node_getter: Optional[Callable] = None,
      is_custom_module=False,
      is_standalone_module=False,
  ):
      """Records pattern information in __init__, which will be used
      in convert
      """
      self.node_pattern = node_pattern
      self.modules = modules
      if root_node_getter is None:
          root_node_getter = _default_root_node_getter
      self.root_node = root_node_getter(node_pattern)
      self.is_custom_module_ = is_custom_module
      self.is_standalone_module_ = is_standalone_module
      self.num_tensor_args = 0
      # determine how many of the first two args are Tensors (versus scalars)
      # this distinguishes things like "x + y" from "x + 2" or "2 + x"
      if isinstance(self.root_node, Node):
          cache_for_no_tensor_check: Dict[Node, bool] = {}
          for arg_idx in range(len(self.root_node.args)):
              arg = self.root_node.args[arg_idx]
              if isinstance(arg, Node) and (
                  not all_node_args_have_no_tensors(
                      arg, self.modules, cache_for_no_tensor_check
                  )
              ):
                  self.num_tensor_args += 1
  
imports: from abc import ABC
  from typing import Callable, Dict, List, Optional, Type
  import torch
  from torch.ao.quantization.backend_config import BackendConfig, DTypeConfig, ObservationType
  from torch.ao.quantization.utils import NodePattern, Pattern, QuantizerCls
  from torch.fx.graph import Node
  from .utils import all_node_args_have_no_tensors
label_desc: Use image node_id 1 to create a new QuantizeHandler object from inherited base classes: ABC with example: obj = QuantizeHandler(node_pattern, modules, root_node_getter, is_custom_module, is_standalone_module)