def METHOD_NAME(cls, args, **kwargs):
    data_cfg = S2TDataConfig(Path(args.data) / args.config_yaml)
    dict_path = Path(args.data) / data_cfg.vocab_filename
    if not dict_path.is_file():
        raise FileNotFoundError(f"Dict not found: {dict_path.as_posix()}")
    tgt_dict = Dictionary.load(dict_path.as_posix())
    logger.info(
        f"dictionary size ({data_cfg.vocab_filename}): " f"{len(tgt_dict):,}"
    )
    if getattr(args, "train_subset", None) is not None:
        if not all(s.startswith("train") for s in args.train_subset.split(",")):
            raise ValueError('Train splits should be named like "train*".')
    return cls(args, tgt_dict)