def _get_file(handle):
if not isinstance(handle, IOBase):<EOL><INDENT>return handle<EOL><DEDENT>fd, temp_file = tempfile.mkstemp(str(uuid.uuid4()), prefix='<STR_LIT>')<EOL>os.close(fd)<EOL>with open(temp_file, '<STR_LIT:w>') as fd:<EOL><INDENT>handle.seek(<NUM_LIT:0>)<EOL>shutil.copyfileobj(handle, fd)<EOL><DEDENT>return temp_file<EOL>
Returns the filename of the file to read

    If handle is a stream, a temp file is written on disk first
    and its filename is returned