code: def register_axis_update_op(cls=None, similar_ops=[]):
      """
      :param similar_ops: these ops share the same "update" and
      "can_transpose_pass" methods as the base class.
      For example: the class "transform_reduce_mean" corresponding to
      op "reduce_mean" can be shared with other ops such as
      "reduce_prod", "reduce_sum" etc
      """
  
      def class_wrapper(op_update_cls):
          cls_name = op_update_cls.__name__
          # remove "transform_" to get type of op
          op_type = cls_name[len("transform_") :]
          if op_type in AXIS_UPDATE_OPS:
              raise ValueError(
                  "Update class for op '{}' already defined".format(
                      op_update_cls
                  )
              )
          AXIS_UPDATE_OPS[op_type] = op_update_cls
          for similar_op_type in similar_ops:
              if similar_op_type in AXIS_UPDATE_OPS:
                  raise ValueError(
                      "Update class for op of type '{}' already defined".format(
                          op_type
                      )
                  )
              AXIS_UPDATE_OPS[similar_op_type] = op_update_cls
          return op_update_cls
  
      if cls is None:
          return class_wrapper
  
      return class_wrapper
  
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  from coremltools.converters.mil.mil.passes.pass_registry import register_pass
  from coremltools.converters.mil.mil import Builder
  from coremltools.converters.mil.mil.var import Var
  import logging
  import numpy
  import copy
  from collections import defaultdict
label_desc: Use image node_id 3 for calling a global function with example usage: register_axis_update_op(cls, similar_ops) and returns: class_wrapper, op_update_cls, class_wrapper