class_docstr: Class for registry object which acts as central source of truth
  for MMF
docstr: Register a encoder to registry with key 'name'
  
  Args:
      name: Key with which the encoder will be registered.
  
  Usage::
  
      from mmf.common.registry import registry
      from mmf.modules.encoders import Encoder
  
  
      @registry.register_encoder("transformer")
      class TransformerEncoder(Encoder):
          ...
docstr_tok: ["Register","a","encoder","to","registry","with","key","'name'","Args",":","name",":","Key","with","which","the","encoder","will","be","registered",".","Usage",":",":","from","mmf.common.registry","import","registry","from","mmf.modules.encoders","import","Encoder","@","registry.register_encoder","(","``","transformer","''",")","class","TransformerEncoder","(","Encoder",")",":","..."]
code: def register_encoder(cls, name):
      r"""Register a encoder to registry with key 'name'
  
      Args:
          name: Key with which the encoder will be registered.
  
      Usage::
  
          from mmf.common.registry import registry
          from mmf.modules.encoders import Encoder
  
  
          @registry.register_encoder("transformer")
          class TransformerEncoder(Encoder):
              ...
  
      """
  
      def wrap(encoder_cls):
          from mmf.modules.encoders import Encoder
  
          assert issubclass(
              encoder_cls, Encoder
          ), "All encoders must inherit Encoder class"
          cls.mapping["encoder_name_mapping"][name] = encoder_cls
          return encoder_cls
  
      return wrap
  
imports: from mmf.utils.env import setup_imports
label_desc: Use image node_id 17 for calling the Registry obj's underlying member method code with example usage: obj.register_encoder(cls, name) and returns: wrap, encoder_cls