def _get_op_config(self, op: operation.Operation):
        """
        This utility function retrieve the compression config for an non-const operation.Operation instance.
        The priority is by: op name -> op type -> global
        """
        if not isinstance(op, operation.Operation):
            raise TypeError(f"op must be type of operation.Operation. Got {type(op)}")

        if op.op_type == "const":
            raise TypeError("op must not be of type const")

        if op.name in self.op_name_configs:
            return self.op_name_configs[op.name]
        elif op.op_type in self.op_type_configs:
            return self.op_type_configs[op.op_type]

        return self.global_config

        This utility function retrieve the compression config for an non-const operation.Operation instance.
        The priority is by: op name -> op type -> global
        
coremltools/optimize/coreml/_config.py