code: def get_quant_shape(shape, quant_type, quant_scheme):
      default_idx = 0 if quant_type == QuantType.WEIGHT else 1
      if is_per_channel(quant_scheme):
          quant_shape = [
              1 if idx != default_idx else s
              for idx, s in enumerate(shape)
          ]
      else:
          quant_shape = [1]
      return quant_shape
  
file_path: nni/nni/compression/utils/quantization/utils.py
imports: import torch
  from nni.common.version import TORCH_VERSION
  from .literal import QuantDtype, QuantScheme, QuantType
label_desc: Use image node_id 7 for calling a global function with example usage: get_quant_shape(shape, quant_type, quant_scheme) and returns: quant_shape