code: @Nullable
    public final Node getAncestor(int level) {
      checkArgument(level >= 0);
      Node node = this;
      while (node != null && level-- > 0) {
        node = node.getParent();
      }
      return node;
    }
docs: Gets the ancestor node relative to this.
  
  @param level 0 = this, 1 = the parent, etc.