text: import shutil
  
  import requests
  
  
  def download_document(url: str, output_filename: str) -> None:
      req = requests.get(url, stream=True)
      if req.status_code == 200:
          with open(output_filename, 'wb') as f:
              req.raw.decode_content = True
              shutil.copyfileobj(req.raw, f)
      else:
          raise ValueError(f'Error when downloading document: {req.content.decode()}')
  