          """ Write the model zip file to disk.
  
          Parameters
          ----------
          response: :class:`urllib.request.urlopen`
              The response from the model download task
          downloaded_size: int
              The amount of bytes downloaded so far
          """
          length = int(response.getheader("content-length")) + downloaded_size
 
</s> remove         length = int(response.getheader("content-length")) + downloaded_size
 </s> add         content_length = response.getheader("content-length")
        content_length = "0" if content_length is None else content_length
        length = int(content_length) + downloaded_size </s> remove     def _write_zipfile(self, response, downloaded_size):
 </s> add     def _write_zipfile(self, response: "HTTPResponse", downloaded_size: int) -> None: </s> remove         zip_file: str
 </s> add         zip_file: :class:`zipfile.ZipFile` </s> remove         self.logger.trace(retval)
 </s> add         self.logger.trace(retval)  # type: ignore </s> remove         self.logger.trace(retval)
 </s> add         self.logger.trace(retval)  # type: ignore
        response: :class:`http.client.HTTPResponse`
          """ Write the model zip file to disk.
  
          Parameters
          ----------
        response: :class:`http.client.HTTPResponse`
              The response from the model download task
          downloaded_size: int
              The amount of bytes downloaded so far
          """
          length = int(response.getheader("content-length")) + downloaded_size
keep keep keep keep replace keep keep keep keep keep
 lib.Utils - add DPI detector 
lib/utils.py