def url_scheme_parse(url) -> Tuple[str, int]:
    """
    Parse the URL scheme and host from the URL.

    Parameters
    ----------
    url (str): The URL to parse. i.e. nebula://localhost:9669

    Returns
    -------
    Tuple[str, int]: A tuple containing the address and port.

    """
    scheme, address = url.split("://")
    if scheme not in ["nebula", "nebula3"]:
        raise ValueError(f"Invalid scheme {scheme}. Expected 'nebula' or 'nebula3'.")
    host, port = address.split(":")
    if not host:
        raise ValueError("Invalid host. Expected a hostname or IP address.")
    if not port:
        raise ValueError("Invalid port. Expected a port number.")
    if not port.isdigit():
        raise ValueError("Invalid port. Expected a number.")
    return host, int(port)

    Parse the URL scheme and host from the URL.

    Parameters
    ----------
    url (str): The URL to parse. i.e. nebula://localhost:9669

    Returns
    -------
    Tuple[str, int]: A tuple containing the address and port.

    
llama-index-integrations/graph_stores/llama-index-graph-stores-nebula/llama_index/graph_stores/nebula/utils.py