code: def register_engine(name: str):
      """
      Register an engine
  
      The decorator allows to register specific kind of actions (like
      training a model, extracting its feature, etc) that can be run
      by VISSL by providing the corresponding name in the 'engine_name'
      of the configuration.
      """
  
      def register_engine_function(cls):
          if name in _ENGINE_REGISTRY:
              tb = _ENGINE_REGISTRY_TRACE_BACK[name]
              msg = f"Engine ({name}) already registered at \n{tb}\n"
              raise ValueError(msg)
  
          if not issubclass(cls, Engine):
              raise ValueError(
                  f"Engine ({name}: {cls.__name__}) must extend Engine"
              )
  
          _ENGINE_REGISTRY[name] = cls
          _ENGINE_REGISTRY_TRACE_BACK[name] = "".join(
              traceback.format_stack()
          )
          return cls
  
      return register_engine_function
  
file_path: vissl/vissl/engines/engine_registry.py
imports: import abc
  import traceback
  from typing import Any, Callable, List
  from classy_vision.hooks import ClassyHook
  from vissl.config.attr_dict import AttrDict
  from vissl.hooks import default_hook_generator
label_desc: Use image node_id 1 for calling a global function with example usage: register_engine(name) and returns: register_engine_function, cls