def _climb_to(node, level):
  """Traverses the Merkle Tree to a certain level.

  :param node: marks the starting point from which we begin climbing up the tree.
  :param level: an integer that indicates how many levels we need to climb.
  :return: ancestor of the provided node object at the specified level of the tree.
     None if the starting node doesn't have ancestors at the requested level.
  """
  while (level > 0) and node:
    level -= 1
    node = node.parent
  return node