def METHOD_NAME(connection_string):
    """
    Parse connection string in format:
        master_name/sentinel_server:port,sentinel_server:port/db_id
    Returns master name, list of tuples with pair (host, port) and db_id
    """
    try:
        master_name, servers_string, database_name = connection_string.split("/")
        servers = [host_port.split(":") for host_port in servers_string.split(",")]
        sentinel_hosts = [(host, int(port)) for host, port in servers]
    except (ValueError, TypeError, IndexError) as error:
        raise ImproperlyConfigured(
            f"Incorrect format '{connection_string:s}'"
        ) from error
    return master_name, sentinel_hosts, database_name