class_docstr: Class for registry object which acts as central source of truth
  for MMF
docstr: Register a modality pooling method to registry with key 'name'
  
  Args:
      name: Key with which the pooling method will be registered.
  
  Usage::
  
      from mmf.common.registry import registry
      from torch import nn
  
      @registry.register_pool("average_pool")
      class average_pool(nn.Module):
          ...
docstr_tok: ["Register","a","modality","pooling","method","to","registry","with","key","'name'","Args",":","name",":","Key","with","which","the","pooling","method","will","be","registered",".","Usage",":",":","from","mmf.common.registry","import","registry","from","torch","import","nn","@","registry.register_pool","(","``","average_pool","''",")","class","average_pool","(","nn.Module",")",":","..."]
code: def register_pooler(cls, name):
      r"""Register a modality pooling method to registry with key 'name'
  
      Args:
          name: Key with which the pooling method will be registered.
  
      Usage::
  
          from mmf.common.registry import registry
          from torch import nn
  
          @registry.register_pool("average_pool")
          class average_pool(nn.Module):
              ...
  
      """
  
      def wrap(func):
          from torch import nn
  
          assert issubclass(
              func, nn.Module
          ), "All pooling methods must inherit torch.nn.Module class"
          cls.mapping["pool_name_mapping"][name] = func
          return func
  
      return wrap
  
imports: from mmf.utils.env import setup_imports
label_desc: Use image node_id 7 for calling the Registry obj's underlying member method code with example usage: obj.register_pooler(cls, name) and returns: wrap, func