def gen_child_count(dx_nodes, child_cnt, *dx_node_types):
    """
    Generator for dx_nodes of a certain type and a specific number of children

    :param dx_nodes: [DiffxNode, DiffxNode, .. ]
    :param child_cnt: int - number of children
    """
    for _dx_node in dx_nodes:
        if _dx_node.child_cnt == child_cnt:
            if isinstance(_dx_node.type, dx_node_types):
                yield _dx_node
