code: function isDefinedInNestedScope(path, outermostScopeUid) {
    return path.findParent(
      parent =>
        parent.scope.hasOwnBinding(path.node.name) &&
        parent.scope.uid > outermostScopeUid
    );
  }
docs: Traverses the tree upward to see if the identifier is defined in a higher scope that is nested within outermostScope. path: babel path identifierName: string outermostScopeUid: number (Higher number means deeper nesting)