class_docstr: Masked language model for BERT style pre-training.
class_docstr_tok: ["Masked","language","model","for","BERT","style","pre-training","."]
code: def arrange_targets(self, tensor_dict):
      tokens, *other = tensor_dict["tokens"]
      masked_target = self._mask_output(tokens, self.mask)
      # (masked targets, #predicted tokens, #input tokens)
      return masked_target, self.mask.sum(-1), self.pad_mask.sum(-1)
  
imports: from typing import Dict, List
  import torch
  from fairseq.modules.transformer_sentence_encoder import init_bert_params
  from pytext.common.constants import SpecialTokens, Stage
  from pytext.config import ConfigBase
  from pytext.data.bert_tensorizer import BERTTensorizerBase
  from pytext.data.tensorizers import Tensorizer
  from pytext.data.utils import Vocabulary
  from pytext.models.decoders.mlp_decoder import MLPDecoder
  from pytext.models.masking_utils import frequency_based_masking, MaskingStrategy, random_masking
  from pytext.models.model import BaseModel
  from pytext.models.module import create_module
  from pytext.models.output_layers.lm_output_layer import LMOutputLayer
  from pytext.models.representations.transformer_sentence_encoder import TransformerSentenceEncoder
  from pytext.models.representations.transformer_sentence_encoder_base import TransformerSentenceEncoderBase
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 4 for calling the MaskedLanguageModel obj's underlying member method code with example usage: obj.arrange_targets(tensor_dict) and returns: masked_target,  self,  self