code: private Symbol isAnySymbolDeclared(String name, Node declNode, SymbolScope scope) {
      Symbol sym = symbols.get(declNode, name);
      if (sym == null) {
        // Sometimes, our symbol tables will disagree on where the
        // declaration node should be. In the rare case where this happens,
        // trust the existing symbol.
        // See SymbolTableTest#testDeclarationDisagreement.
        return scope.ownSymbols.get(name);
      }
      return sym;
    }
docs: Checks if any symbol is already declared at the given node and scope for the given name. If so,
  returns it.