#NEWLINE# def download_file( url , filepath ) : #NEWLINE# #INDENT# response = requests . get ( url , stream = True ) #NEWLINE# logger . info ( 'Downloading {}' . format ( url ) ) #NEWLINE# with open ( filepath , 'wb' ) as local_file : #NEWLINE# #INDENT# local_file . write ( response . content ) #NEWLINE# #UNINDENT# logger . info ( 'File downloaded and saved succesfully' )