def METHOD_NAME(self, seed, extra_args=None):
    if extra_args is None:
        extra_args = []
    with tempfile.TemporaryDirectory(f"_train_transformer_seed{seed}") as data_dir:
        create_dummy_data(data_dir)
        preprocess_translation_data(data_dir)
        train_translation_model(
            data_dir,
            "transformer_iwslt_de_en",
            [
                "--encoder-layers",
                "3",
                "--decoder-layers",
                "3",
                "--encoder-embed-dim",
                "8",
                "--decoder-embed-dim",
                "8",
                "--seed",
                str(seed),
            ]
            + extra_args,
        )
        yield os.path.join(data_dir, "checkpoint_last.pt")