class_docstr: Class for registry object which acts as central source of truth
  for MMF
docstr: Register a callback to registry with key 'name'
  
  Args:
      name: Key with which the callback will be registered.
  
  Usage::
  
      from mmf.common.registry import registry
      from mmf.trainers.callbacks.base import Callback
  
  
      @registry.register_callback("logistic")
      class LogisticCallback(Callback):
          ...
docstr_tok: ["Register","a","callback","to","registry","with","key","'name'","Args",":","name",":","Key","with","which","the","callback","will","be","registered",".","Usage",":",":","from","mmf.common.registry","import","registry","from","mmf.trainers.callbacks.base","import","Callback","@","registry.register_callback","(","``","logistic","''",")","class","LogisticCallback","(","Callback",")",":","..."]
code: def register_callback(cls, name):
      r"""Register a callback to registry with key 'name'
  
      Args:
          name: Key with which the callback will be registered.
  
      Usage::
  
          from mmf.common.registry import registry
          from mmf.trainers.callbacks.base import Callback
  
  
          @registry.register_callback("logistic")
          class LogisticCallback(Callback):
              ...
  
      """
  
      def wrap(func):
          from mmf.trainers.callbacks.base import Callback
  
          assert issubclass(
              func, Callback
          ), "All callbacks must inherit Callback class"
          cls.mapping["callback_name_mapping"][name] = func
          return func
  
      return wrap
  
imports: from mmf.utils.env import setup_imports
label_desc: Use image node_id 3 for calling the Registry obj's underlying member method code with example usage: obj.register_callback(cls, name) and returns: wrap, func