static walkSubtrees(root, fn) {
    var visit = (node, parent, ancestors) => {
      fn(node, parent, ancestors);
      ancestors = ancestors.concat(node);
      NodeUtils.getChildren(node).forEach((child) => {
        visit(child, node, ancestors);
      });
    };

    NodeUtils.getChildren(root).forEach((child) => {
      visit(child, null, []);
    });
  }
Walks a root node's subtrees using DFS, invoking the passed callback with
three args: node, parent, and ancestors. The root node, presumably Program,
is ignored.

@param {Node}     root The root node of the AST to traverse
@param {function} fn   Callback to invoke