code: def get_bits_length(config, quant_type):
      if isinstance(config["quant_bits"], int):
          return config["quant_bits"]
      else:
          return config["quant_bits"].get(quant_type)
  
imports: import logging
  import copy
  import torch
  from schema import Schema, And, Or, Optional
  from ..utils.config_validation import CompressorSchema
  from ..compressor import Quantizer, QuantGrad, QuantType
label_desc: Use image node_id 3 for calling a global function with example usage: get_bits_length(config, quant_type) and returns: config, config