code: def write_raw(self, resp: Union[bytes, requests.Response], filename: str) -> None:
          
          self.log(filename, end=' ', flush=True)
          with open(filename, 'wb') as file:
              if isinstance(resp, requests.Response):
                  shutil.copyfileobj(resp.raw, file)
              else:
                  file.write(resp)
docs: Write raw response data into a file.
  
          .. versionadded:: 4.2.1