class_docstr: Class for registry object which acts as central source of truth
  for MMF
docstr: Register a datamodule to registry with key 'name'
  
  Args:
      name: Key with which the datamodule will be registered.
  
  Usage::
  
      from mmf.common.registry import registry
      import pytorch_lightning as pl
  
  
      @registry.register_datamodule("my_datamodule")
      class MyDataModule(pl.LightningDataModule):
          ...
docstr_tok: ["Register","a","datamodule","to","registry","with","key","'name'","Args",":","name",":","Key","with","which","the","datamodule","will","be","registered",".","Usage",":",":","from","mmf.common.registry","import","registry","import","pytorch_lightning","as","pl","@","registry.register_datamodule","(","``","my_datamodule","''",")","class","MyDataModule","(","pl.LightningDataModule",")",":","..."]
code: def register_datamodule(cls, name):
      r"""Register a datamodule to registry with key 'name'
  
      Args:
          name: Key with which the datamodule will be registered.
  
      Usage::
  
          from mmf.common.registry import registry
          import pytorch_lightning as pl
  
  
          @registry.register_datamodule("my_datamodule")
          class MyDataModule(pl.LightningDataModule):
              ...
  
      """
  
      def wrap(datamodule_cls):
          import pytorch_lightning as pl
  
          assert issubclass(
              datamodule_cls, pl.LightningDataModule
          ), "All datamodules must inherit PyTorch Lightning DataModule class"
          cls.mapping["builder_name_mapping"][name] = datamodule_cls
          return datamodule_cls
  
      return wrap
  
imports: from mmf.utils.env import setup_imports
label_desc: Use image node_id 18 for calling the Registry obj's underlying member method code with example usage: obj.register_datamodule(cls, name) and returns: wrap, datamodule_cls