code: def get_url(host_ip: str) -> str:
      """Get the URL for any app served at the given host_ip.
  
      Parameters
      ----------
      host_ip : str
          The IP address of the machine that is running the Streamlit Server.
  
      Returns
      -------
      str
          The URL.
      """
      protocol = (
          "https" if config.get_option("server.sslCertFile") else "http"
      )
  
      port = _get_browser_address_bar_port()
      base_path = config.get_option("server.baseUrlPath").strip("/")
  
      if base_path:
          base_path = "/" + base_path
  
      host_ip = host_ip.strip("/")
      return f"{protocol}://{host_ip}:{port}{base_path}"
  
file_path: streamlit/lib/streamlit/web/server/server_util.py
imports: from typing import Optional
  from urllib.parse import urljoin
  import tornado.web
  from streamlit import config, net_util, url_util
label_desc: Use image node_id 4 for calling a global function with example usage: get_url(host_ip) and returns: protocol, str, host_ip, str, port, base_path