class_docstr: Base class for overriding backward function of quantization operation.
docstr: Get bit for quantize config
  Parameters
  ----------
  config : Dict
      the configuration for quantization
  quant_type : str
      quant type
  Returns
  -------
  int
      n-bits for quantization configuration
docstr_tok: ["Get","bit","for","quantize","config","Parameters","--","--","--","--","--","config",":","Dict","the","configuration","for","quantization","quant_type",":","str","quant","type","Returns","--","--","--","-","int","n-bits","for","quantization","configuration"]
code: def get_bits_length(cls, config, quant_type):
      """
      Get bit for quantize config
      Parameters
      ----------
      config : Dict
          the configuration for quantization
      quant_type : str
          quant type
      Returns
      -------
      int
          n-bits for quantization configuration
      """
      if isinstance(config["quant_bits"], int):
          return config["quant_bits"]
      else:
          return config["quant_bits"].get(quant_type)
  
imports: import types
  import logging
  import torch
  from .None import default_layers
label_desc: Use image node_id 2 for calling the QuantGrad obj's underlying member method code with example usage: obj.get_bits_length(cls, config, quant_type) and returns: config, config