def first_child_node(node):
    """Returns the first child node of the given node."""
    children = list(node.get_children())
    assert children, 'there are no children in node {}'.format(node)
    return children[0]