code: def save_downloaded_file(filename, save_file_at, file_stream):
          
          filename = os.path.join(save_file_at, filename)
          with open(filename, 'wb') as f:
              f.write(file_stream)
              f.flush()
docs: Save Downloaded File to Disk Helper Function
  
          :param save_file_at: Path of where to save the file.
          :param file_stream: File stream
          :param filename: Name to save the file.