def output_adjacent_tmpdir(output_path):
 return os.path.dirname(output_path)

def output_adjacent_tmpdir ( output_path ) : return os . path . dirname ( output_path )
for temp files that will ultimately be moved to output_path anyway just create the file directly in output_paths directory so shutil .