def register_axis_update_op(ops: List[Text]):
        """
        :param ops: Ops that will be registered. For example: the class "_TransformReduceMean" can
        be used to register ops including "reduce_prod", "reduce_sum" etc.
        """

        def class_wrapper(op_update_cls):
            for op_type in ops:
                if op_type in _TransposeOptimization._AXIS_UPDATE_OPS:
                    raise ValueError(
                        "Update class for op of type '{}' already defined".format(op_type)
                    )
                _TransposeOptimization._AXIS_UPDATE_OPS[op_type] = op_update_cls
            return op_update_cls

        return class_wrapper

        :param ops: Ops that will be registered. For example: the class "_TransformReduceMean" can
        be used to register ops including "reduce_prod", "reduce_sum" etc.
        
coremltools/converters/mil/mil/passes/defs/optimize_repeat_ops.py