docs: def convert(self, blob, **kw):
          """Convert using unoconv converter."""
          timeout = self.run_timeout
          with make_temp_file(blob) as in_fn, make_temp_file(
              prefix="tmp-unoconv-", suffix=".pdf"
          ) as out_fn:
  
              args = ["-f", "pdf", "-o", out_fn, in_fn]
              # Hack for my Mac, FIXME later
              if Path("/Applications/LibreOffice.app/Contents/program/python").exists():
                  cmd = [
                      "/Applications/LibreOffice.app/Contents/program/python",
                      "/usr/local/bin/unoconv",
                  ] + args
              else:
                  cmd = [self.unoconv] + args
  
              def run_uno():
                  try:
                      self._process = subprocess.Popen(
                          cmd, close_fds=True, cwd=bytes(self.tmp_dir)
                      )
                      self._process.communicate()
                  except Exception as e:
                      logger.error("run_uno error: %s", bytes(e), exc_info=True)
                      raise ConversionError("unoconv failed") from e
  
              run_thread = threading.Thread(target=run_uno)
              run_thread.start()
              run_thread.join(timeout)
  
              try:
                  if run_thread.is_alive():
                      # timeout reached
                      self._process.terminate()
                      if self._process.poll() is not None:
                          try:
                              self._process.kill()
                          except OSError:
                              logger.warning("Failed to kill process %s", self._process)
  
                      self._process = None
                      raise ConversionError(f"Conversion timeout ({timeout})")
  
                  converted = open(out_fn).read()
                  return converted
              finally:
                  self._process = None