def to_grpc_address(target: str) -> str:
    """Converts a standard gRPC target to one that is supported by grpcio

    :param target: the server address.
    :returns: the converted address.

    """
    u = urlparse(target)
    if u.scheme == "dns":
        raise ValueError("dns:// not supported")

    if u.scheme == "unix":
        return "unix:"+u.path

    return u.netloc
def to_grpc_address ( target : str ) -> str : u = urlparse ( target ) if u . scheme == "dns" : raise ValueError ( "dns:// not supported" ) if u . scheme == "unix" : return "unix:" + u . path return u . netloc
Converts a standard gRPC target to one that is supported by grpcio

    :param target: the server address.
    :returns: the converted address.