              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
          if length == downloaded_size:
              self.logger.info("Zip already exists. Skipping download")
              return
          write_type = "wb" if downloaded_size == 0 else "ab"
          with open(self._model_zip_path, write_type) as out_file:
 
</s> remove         response: :class:`urllib.request.urlopen`
 </s> add         response: :class:`http.client.HTTPResponse` </s> remove         self.logger.trace(retval)
 </s> add         self.logger.trace(retval)  # type: ignore </s> remove     def model_path(self):
        """ str: The model path(s) in the cache folder. """
        retval = [os.path.join(self._cache_dir, fname) for fname in self._model_filename]
        retval = retval[0] if len(retval) == 1 else retval
        self.logger.trace(retval)
 </s> add     def model_path(self) -> Union[str, List[str]]:
        """ str or list: The model path(s) in the cache folder. """
        paths = [os.path.join(self._cache_dir, fname) for fname in self._model_filename]
        retval: Union[str, List[str]] = paths[0] if len(paths) == 1 else paths
        self.logger.trace(retval)  # type: ignore </s> remove     def _url_partial_size(self):
        """ float: How many bytes have already been downloaded. """
 </s> add     def _url_partial_size(self) -> int:
        """ int: How many bytes have already been downloaded. """ </s> remove         zip_file: str
 </s> add         zip_file: :class:`zipfile.ZipFile`
        content_length = response.getheader("content-length")
        content_length = "0" if content_length is None else content_length
        length = int(content_length) + downloaded_size
              The response from the model download task
          downloaded_size: int
              The amount of bytes downloaded so far
          """
        content_length = response.getheader("content-length")
        content_length = "0" if content_length is None else content_length
        length = int(content_length) + downloaded_size
          if length == downloaded_size:
              self.logger.info("Zip already exists. Skipping download")
              return
          write_type = "wb" if downloaded_size == 0 else "ab"
          with open(self._model_zip_path, write_type) as out_file:
keep keep keep keep replace keep keep keep keep keep
 lib.Utils - add DPI detector 
lib/utils.py