ReferencedIdentifier(path) {
          if (isLabelIdentifier(path)) {
            return;
          }
          const {
            scope,
            node: { name }
          } = path;
          const binding = scope.getBinding(name);
          if (!binding) {
            // Do not collect globals as they are already available via
            // babel's API
            if (scope.hasGlobal(name)) {
              return;
            }
            // This should NOT happen ultimately. Panic if this code block is
            // reached
            throw new Error(
              `Binding not found for ReferencedIdentifier "${name}" ` +
                `present in "${path.parentPath.type}". ` +
                `Please report this at ${newIssueUrl}`
            );
          } else {
            // Add it to our scope tracker if everything is fine
            scopeTracker.addReference(scope, binding, name);
          }
        }
This is necessary because, in Babel, the scope.references
does NOT contain the references in that scope. Only the program
scope (top most level) contains all the references.

We collect the references in a fashion where all the scopes between
and including the referenced scope and scope where it is declared
is considered as scope referencing that identifier