@contextmanager
def copy_file_to_temp(source):
 temp_filename = get_temp_filename()
 with copy_file(source, temp_filename):
  (yield temp_filename)

@ contextmanager def copy_file_to_temp ( source ) : temp_filename = get_temp_filename ( ) with copy_file ( source , temp_filename ) : ( yield temp_filename )
context manager that copies the source file to a temporary destination .