code: def _construct_url(self, endpoint):
          
          parsed_url = urlparse(self.host)
          scheme = parsed_url[0]
          host = parsed_url[1]
          # Handle host without a scheme specified (eg. www.example.com)
          if scheme == "":
              scheme = "http"
              host = self.host
  
          if not endpoint.startswith("/"):
              endpoint = "/" + endpoint
          if self.config["api_version"] is not None:
              endpoint = "/v%d%s" % (self.config["api_version"], endpoint)
          return urlunparse((scheme, host, endpoint, '', '', ''))
docs: Return the full URL to the specified endpoint