code: def get_endpoint_server_root(self):
          
          parsed = urlparse(self._endpoint)
          root = parsed.scheme + "://" + parsed.hostname
  
          if parsed.port is not None:
              root += ":" + unicode(parsed.port)
  
          return root
docs: Parses RemoteLRS object's endpoint and returns its root
  
          :return: Root of the RemoteLRS object endpoint
          :rtype: unicode