code: def _get_registering_decorator(register_function):
      def decorator(*args, **kwargs):
          if len(args) == 1 and callable(args[0]) and len(kwargs) == 0:
              register_function(args[0])
              return args[0]
  
          def register(func):
              register_function(func, args, **kwargs)
              return func
  
          return register
  
      return decorator
  
file_path: poutyne/poutyne/framework/metrics/metrics_registering.py
imports: from poutyne.framework.metrics.utils import camel_to_snake
label_desc: Use image node_id 1 for calling a global function with example usage: _get_registering_decorator(register_function) and returns: decorator, register, args, func