def node_ancestor(node, levels)
      while levels > 0
        node = node.node_parent
        return unless node
        levels -= 1
      end

      node
    end
def node_ancestor(node, levels)
      while levels > 0
        node = node.node_parent
        return unless node
        levels -= 1
      end

      node
    end
Return nth-ancestor of a node, where 1 is the parent, 2 is grandparent,
 etc.

 @param node [Sass::Tree::Node, Sass::Script::Tree::Node]
 @param level [Integer]
 @return [Sass::Tree::Node, Sass::Script::Tree::Node, nil]