Get the ancestor node of a node which is generation generations away from node.

get_ancestor_node(node, generation)

Arguments

node

A ExplorerNode.

generation

An integer indicating the number of generations to go back in the node tree. Negative integers and 0 will result in returning node.

If generation is greater than the number of the node's ancestors, NULL is returned.