import itertools


def node_and_primary_descendants(node):
    """Gets an iterator for a node and all of its visible descendants

    :param node Node: target Node
    """
    return itertools.chain([node], node.get_descendants_recursive(lambda n: n.primary))