def METHOD_NAME(tmp_path_factory: pytest.TempPathFactory) -> str:
    path = str(tmp_path_factory.mktemp("data") / "{dataset_name}.py")
    with open(path, "w", newline="") as f:
        f.write(DATASET_SCRIPT_WITH_EXTERNAL_FILES_CONTENT)
    return path