class_docstr: Head for masked language modeling.
class_docstr_tok: ["Head","for","masked","language","modeling","."]
code: def forward(self, features, masked_tokens=None, **kwargs):
      # Only project the unmasked tokens while training,
      # saves both memory and computation
      if masked_tokens is not None:
          features = features[masked_tokens, :]
  
      x = self.dense(features)
      x = self.activation_fn(x)
      x = self.layer_norm(x)
  
      x = copy_to_model_parallel_region(x)
      # project back to size of vocabulary with bias
      x = F.linear(x, self.weight)
      x = gather_from_model_parallel_region(x).contiguous()
      x = x + self.bias
      return x
  
imports: import logging
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from fairseq.model_parallel.models.transformer import ModelParallelTransformerEncoder
  from fairseq.models import register_model, register_model_architecture
  from fairseq.models.roberta import roberta_base_architecture, roberta_prenorm_architecture, RobertaEncoder, RobertaModel
  from fairseq.modules import LayerNorm
label_desc: Use image node_id 2 for calling the ModelParallelRobertaLMHead obj's underlying member method code with example usage: obj.forward(features, masked_tokens) and returns: x