code: def register_mil_to_nn_mapping(func=None, override=False):
      def func_wrapper(_func):
          f_name = _func.__name__
          if not override and f_name in MIL_TO_NN_MAPPING_REGISTRY:
              raise ValueError(
                  "MIL to NN mapping for MIL op {} is already registered.".format(
                      f_name
                  )
              )
          MIL_TO_NN_MAPPING_REGISTRY[f_name] = _func
          return _func
  
      if func is None:
          # decorator called without argument
          return func_wrapper
      return func_wrapper(func)
  
label_desc: Use image node_id 1 for calling a global function with example usage: register_mil_to_nn_mapping(func, override) and returns: func_wrapper, _func, func_wrapper