def METHOD_NAME(self, args, task, cls_dictionary=MaskedLMDictionary):
    assert hasattr(args, "pretrained_xlm_checkpoint"), (
        "You must specify a path for --pretrained-xlm-checkpoint to use "
        "--arch transformer_from_pretrained_xlm"
    )
    assert isinstance(task.source_dictionary, cls_dictionary) and isinstance(
        task.target_dictionary, cls_dictionary
    ), (
        "You should use a MaskedLMDictionary when using --arch "
        "transformer_from_pretrained_xlm because the pretrained XLM model "
        "was trained using data binarized with MaskedLMDictionary. "
        "For translation, you may want to use --task "
        "translation_from_pretrained_xlm"
    )
    assert not (
        getattr(args, "init_encoder_only", False)
        and getattr(args, "init_decoder_only", False)
    ), "Only one of --init-encoder-only and --init-decoder-only can be set."
    return super().METHOD_NAME(args, task)