class_docstr: Class for registry object which acts as central source of truth
  for MMF
docstr: Register a model to registry with key 'name'
  
  Args:
      name: Key with which the model will be registered.
  
  Usage::
  
      from mmf.common.registry import registry
      from mmf.models.base_model import BaseModel
  
      @registry.register_task("pythia")
      class Pythia(BaseModel):
          ...
docstr_tok: ["Register","a","model","to","registry","with","key","'name'","Args",":","name",":","Key","with","which","the","model","will","be","registered",".","Usage",":",":","from","mmf.common.registry","import","registry","from","mmf.models.base_model","import","BaseModel","@","registry.register_task","(","``","pythia","''",")","class","Pythia","(","BaseModel",")",":","..."]
code: def register_model(cls, name):
      r"""Register a model to registry with key 'name'
  
      Args:
          name: Key with which the model will be registered.
  
      Usage::
  
          from mmf.common.registry import registry
          from mmf.models.base_model import BaseModel
  
          @registry.register_task("pythia")
          class Pythia(BaseModel):
              ...
      """
  
      def wrap(func):
          from mmf.models.base_model import BaseModel
  
          assert issubclass(
              func, BaseModel
          ), "All models must inherit BaseModel class"
          cls.mapping["model_name_mapping"][name] = func
          return func
  
      return wrap
  
imports: from mmf.utils.env import setup_imports
label_desc: Use image node_id 9 for calling the Registry obj's underlying member method code with example usage: obj.register_model(cls, name) and returns: wrap, func