code: function(depth) {
          if (depth >= this.depth || depth < 0)  {
              return null;
          }
  
          var p = this.parent;
          
          while (p.depth > depth) {
              p = p.parent;
          }
  
          return p;
      }
docs: Returns this node's ancestor at the specified depth.
  @method getAncestor
  @param {int} depth the depth of the ancestor.
  @return {Node} the ancestor