code: public Symbol getSymbolForScope(SymbolScope scope) {
      if (scope.getSymbolForScope() == null) {
        scope.setSymbolForScope(findSymbolForScope(scope));
      }
      return scope.getSymbolForScope();
    }
docs: All local scopes are associated with a function, and some functions are associated with a
  symbol. Returns the symbol associated with the given scope.