class_docstr: The abstract class for the compression graph passes.
class_docstr_tok: ["The","abstract","class","for","the","compression","graph","passes","."]
docstr: By default, output channel is used as the channel axis. Here are some representative ops:
  - linear: [D_out, D_in]
  - matmul's y: [..., D_in, D_out] if transpose_y is False, else [..., D_out, D_in]
  - conv: [C_out, C_in_div_group, KH, KW]
  - conv_transpose: [C_in, C_out_div_group, KH, KW]
  
  So the channel axis picking criterial is:
  - For conv_transpose it's 1
  - For matmul's y it's -1 (transpose_y=False) or -2 (transpose_y=True)
  - For all other ops, it's 0
code: def pick_channnel_axis(op: Operation) -> int:
      """
      By default, output channel is used as the channel axis. Here are some representative ops:
      - linear: [D_out, D_in]
      - matmul's y: [..., D_in, D_out] if transpose_y is False, else [..., D_out, D_in]
      - conv: [C_out, C_in_div_group, KH, KW]
      - conv_transpose: [C_in, C_out_div_group, KH, KW]
  
      So the channel axis picking criterial is:
      - For conv_transpose it's 1
      - For matmul's y it's -1 (transpose_y=False) or -2 (transpose_y=True)
      - For all other ops, it's 0
      """
      channel_axis = 0
      var = op.outputs[0]
      if len(var.child_ops) == 1:
          child_op = var.child_ops[0]
          if child_op.op_type == "conv_transpose":
              channel_axis = 1
          if child_op.op_type == "matmul" and child_op.y == var:
              channel_axis = -1 if child_op.transpose_y else -2
      return channel_axis
  
imports: from typing import Callable, Optional, Tuple
  import numpy
  from tqdm import tqdm
  from coremltools import _logger
  from coremltools.converters.mil._deployment_compatibility import AvailableTarget
  from coremltools.converters.mil.backend.mil.load import should_use_weight_file
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil import Operation, Program, types
  from coremltools.converters.mil.mil.block import is_current_opset_version_compatible_with
  from coremltools.converters.mil.mil.ops.defs._utils import pack_elements_into_bits
  from coremltools.converters.mil.mil.ops.defs.iOS16 import constexpr_affine_dequantize, constexpr_lut_to_dense, constexpr_sparse_to_dense
  from coremltools.converters.mil.mil.passes.defs.quantization import AbstractQuantizationPass
  from coremltools.converters.mil.mil.passes.helper import block_context_manager
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
  from coremltools.converters.mil.mil.types.type_mapping import nptype_from_builtin
  from coremltools.models.neural_network.quantization_utils import _get_kmeans_lookup_table_and_weight
  from coremltools.optimize.coreml._config import OpLinearQuantizerConfig, OpMagnitudePrunerConfig, OpPalettizerConfig, OpThresholdPrunerConfig, OptimizationConfig
label_desc: Use image node_id 7 for calling the AbstractCompressionPass obj's underlying member method code with example usage: obj.pick_channnel_axis(op) and returns: channel_axis