find(tree, query, {skipTypes = []} = {}) {
    const predicate = this.createFindPredicate(query);
    let found;

    this.traverse(tree, {
      enter(node, parent) {
        if (includes(node.type, skipTypes)) {
          return estraverse.VisitorOption.Skip;
        }
        if (predicate(node, parent)) {
          found = node;
          return estraverse.VisitorOption.Break;
        }
      }
    });

    return found;
  }
Searches in AST tree for node which satisfies the predicate.
@param  {Object} tree
@param  {Function|String} query Search function called with `node` and `parent`
  Alternatively it can be string: the node type to search for.
@param  {String[]} opts.skipTypes List of node types to skip (not traversing into these nodes)
@return {Object} The found node or undefined when not found