def save_csv_tmp(out: luigi.LocalTarget, X, *args, **kwargs): with out.temporary_path() as tmp_path: save_csv(tmp_path, X, *args, **kwargs)