class_docstr: Task for training Masked LM (BERT) model.
  Args:
      dictionary (Dictionary): the dictionary for the input of the task
class_docstr_tok: ["Task","for","training","Masked","LM","(","BERT",")","model",".","Args",":","dictionary","(","Dictionary",")",":","the","dictionary","for","the","input","of","the","task"]
docstr: Setup the task.
docstr_tok: ["Setup","the","task","."]
code: def setup_task(cls, args, **kwargs):
      """Setup the task."""
      paths = utils.split_paths(args.data)
      assert len(paths) > 0
      dictionary = BertDictionary.load(
          os.path.join(paths[0], "dict.txt")
      )
      logger.info("dictionary: {} types".format(len(dictionary)))
  
      return cls(args, dictionary)
  
file_path: fairseq/fairseq/tasks/legacy_masked_lm.py
imports: import itertools
  import logging
  import os
  import numpy
  from fairseq import tokenizer, utils
  from fairseq.data import ConcatDataset, Dictionary, data_utils, indexed_dataset
  from fairseq.data.legacy.block_pair_dataset import BlockPairDataset
  from fairseq.data.legacy.masked_lm_dataset import MaskedLMDataset
  from fairseq.data.legacy.masked_lm_dictionary import BertDictionary
  from fairseq.tasks import LegacyFairseqTask, register_task
label_desc: Use image node_id 6 for calling the LegacyMaskedLMTask obj's underlying member method code with example usage: obj.setup_task(cls, args) and returns: cls