class_docstr: This factory is used to create masked language modeling (MLM) task heads.
  This is required due to Transformers implementing different MLM heads for
  different encoders.
  
  Attributes:
      registry (dict): Dynamic registry mapping model architectures to MLM task heads
class_docstr_tok: ["This","factory","is","used","to","create","masked","language","modeling","(","MLM",")","task","heads",".","This","is","required","due","to","Transformers","implementing","different","MLM","heads","for","different","encoders",".","Attributes",":","registry","(","dict",")",":","Dynamic","registry","mapping","model","architectures","to","MLM","task","heads"]
docstr: Registers the ModelArchitectures in model_arch_list as keys mapping to a MLMHead
  
  Args:
      model_arch_list (List[ModelArchitectures]): List of ModelArchitectures mapping to
                                                  an MLM task head.
  
  Returns:
      Callable: MLMHead class
code: def register(
      cls, model_arch_list: List[ModelArchitectures]
  ) -> Callable:
      """Registers the ModelArchitectures in model_arch_list as keys mapping to a MLMHead
  
      Args:
          model_arch_list (List[ModelArchitectures]): List of ModelArchitectures mapping to
                                                      an MLM task head.
  
      Returns:
          Callable: MLMHead class
      """
  
      def inner_wrapper(wrapped_class: BaseMLMHead) -> Callable:
          for model_arch in model_arch_list:
              assert model_arch not in cls.registry
              cls.registry[model_arch] = wrapped_class
          return wrapped_class
  
      return inner_wrapper
  
imports: from __future__ import annotations
  import abc
  import torch
  import torch.nn
  import transformers
  from jiant.ext.allennlp import SelfAttentiveSpanExtractor
  from jiant.shared.model_resolution import ModelArchitectures
  from jiant.tasks.core import TaskTypes
  from typing import Callable
  from typing import List
label_desc: Use image node_id 1 for calling the JiantMLMHeadFactory obj's underlying member method code with example usage: obj.register(cls, model_arch_list) and returns: inner_wrapper, wrapped_class