code: def __init__(self, config):
      self.input: Optional[TensorQuantSetting] = None
      self.weight: Optional[TensorQuantSetting] = None
      self.output: Optional[TensorQuantSetting] = None
      self._extra_layer_setting = {}
  
      for quant_type in QuantType:
          if quant_type in config.get("quant_types", []):
              setting = TensorQuantSetting()
  
              quant_scheme = self.parse_optional_config(
                  config, quant_type, "quant_scheme"
              )
              setting.quant_scheme = quant_scheme
              quant_dtype = self.parse_optional_config(
                  config, quant_type, "quant_dtype"
              )
              setting.quant_dtype = quant_dtype
  
              bits = get_bits_length(config, quant_type)
              qmin, qmax = calculate_qmin_qmax(bits, quant_dtype)
              setting.bits = bits
              setting.qmin = qmin
              setting.qmax = qmax
              setattr(self, quant_type, setting)
  
file_path: nni/nni/compression/utils/quantization/settings.py
imports: from typing import Any, Optional
  from .literal import QuantDtype, QuantType, QuantScheme
  from .utils import calculate_qmin_qmax, get_bits_length
label_desc: Use image node_id 1 to create a new LayerQuantSetting object from inherited base classes: object with example: obj = LayerQuantSetting(config)