    def setup_task(cls, cfg: SpanMaskedLMConfig, **kwargs):
        """Setup the task."""
        paths = utils.split_paths(cfg.data)
        assert len(paths) > 0
        dictionary = Dictionary.load(os.path.join(paths[0], "dict.txt"))
        logger.info("dictionary: {} types".format(len(dictionary)))
        if not hasattr(cfg, "shuffle"):
            cfg.shuffle = False
        return cls(cfg, dictionary)
Setup the task.
fairseq/tasks/span_masked_lm.py