def download_file(url):
response = requests.get(url, stream=True)<EOL>fp = tempfile.NamedTemporaryFile()<EOL>for chunk in response.iter_content(chunk_size=<NUM_LIT>):<EOL><INDENT>if chunk:  <EOL><INDENT>fp.write(chunk)<EOL><DEDENT><DEDENT>return fp<EOL>
Download file