class_docstr: Prepares the model for QAT by inserting weight and activation quantizers as
  specified in qconfig_mapping.
  
  Implements additional graph passes on a prepared module returned by prepare_qat_fx.
class_docstr_tok: ["Prepares","the","model","for","QAT","by","inserting","weight","and","activation","quantizers","as","specified","in","qconfig_mapping",".","Implements","additional","graph","passes","on","a","prepared","module","returned","by","prepare_qat_fx","."]
code: def __init__(
      self,
      prepare_custom_config: _PrepareCustomConfig,
      qconfig_mapping: _aoquant.QConfigMapping,
      backend_config: _BackendConfig,
      quantization_scheme: _QuantizationScheme,
  ):
      self._quantization_scheme = quantization_scheme
      self._qconfig_mapping = qconfig_mapping
      self._prepare_custom_config = prepare_custom_config
      self._backend_config = backend_config
      self._share_qparams_ops = _get_share_qparams_ops(
          self._backend_config
      )
      self._act_quant_groups = dict()
      self._modules_to_replace = _defaultdict(list)
      self._new_act_post_process = dict()
  
imports: from collections import defaultdict
  from typing import Any
  from typing import Optional
  import torch
  import torch.ao.quantization
  import torch.fx
  import torch.nn
  import torch.nn.intrinsic
  import torch.nn.intrinsic.qat
  from torch.ao.quantization.backend_config import BackendConfig
  from torch.ao.quantization.fx.custom_config import PrepareCustomConfig
  from torch.quantization.quantize_fx import prepare_qat_fx
  import coremltools.optimize.torch.quantization.modules.qat_modules
  from coremltools.optimize.torch._utils.torch_utils import get_parent_child_name
  from coremltools.optimize.torch.quantization._backend_config import _fixed_qparams_modules
  from coremltools.optimize.torch.quantization._utils import CombinationOpType
  from coremltools.optimize.torch.quantization._utils import combine_op_type
  from coremltools.optimize.torch.quantization._utils import find_module
  from coremltools.optimize.torch.quantization._utils import find_target
  from coremltools.optimize.torch.quantization._utils import get_share_qparams_ops
  from coremltools.optimize.torch.quantization._utils import group_activation_quantization_modules_by_id
  from coremltools.optimize.torch.quantization._utils import is_activation_post_process
  from coremltools.optimize.torch.quantization._utils import is_quantized
  from coremltools.optimize.torch.quantization.quantization_config import QuantizationScheme
label_desc: Use image node_id 1 to create a new QATConfigurationHandler object  with example: obj = QATConfigurationHandler(prepare_custom_config, qconfig_mapping, backend_config, quantization_scheme)