def create_temporary_copy(path):
    temp_dir = tempfile.gettempdir()
temp_path = os.path.join(temp_dir, 'temp_file_name')
shutil.copy2(path, temp_path)
return temp_path
how to concisely create a temporary file that is a copy of another file in python