(node, s=None)
return s
Build a set of all the nodes in a streamz graph

    Parameters
    ----------
    node : Stream
        The node to use as a starting point for building the set
    s : set or None
        The set to put the nodes into. If None return a new set full of nodes

    Returns
    -------
    s : set
        The set of nodes in the graph
Build a set of all the nodes in a streamz graph
Build a set of all the nodes in a streamz graph
def build_node_set(node, s=None):
    """Build a set of all the nodes in a streamz graph

    Parameters
    ----------
    node : Stream
        The node to use as a starting point for building the set
    s : set or None
        The set to put the nodes into. If None return a new set full of nodes

    Returns
    -------
    s : set
        The set of nodes in the graph

    """
    if s is None:
        s = set()
    if node is None or (
        node in s
        and all(n in s for n in node.upstreams)
        and all(n in s for n in node.downstreams)
    ):
        return
    new_nodes = {n for n in node.downstreams}
    new_nodes.update(node.upstreams)
    new_nodes.add(node)
    s.update(new_nodes)
    [build_node_set(n, s) for n in list(new_nodes)]
    return s
def build_node_set ( node , s = None ) : if s is None : s = set ( ) if node is None or ( node in s and all ( n in s for n in node . upstreams ) and all ( n in s for n in node . downstreams ) ) : return new_nodes = { n for n in node . downstreams } new_nodes . update ( node . upstreams ) new_nodes . add ( node ) s . update ( new_nodes ) [ build_node_set ( n , s ) for n in list ( new_nodes ) ] return s