code: private void updateGlobalNameDeclarationAtFunctionNode(
        Name n, boolean canCollapseChildNames) {
      if (!canCollapseChildNames || !canCollapse(n)) {
        return;
      }
  
      Ref ref = n.getDeclaration();
      String fnName = ref.getNode().getString();
      addStubsForUndeclaredProperties(
          n, fnName, ref.getNode().getAncestor(2), ref.getNode().getParent());
    }
docs: Updates the first initialization (a.k.a "declaration") of a global name
  that occurs at a FUNCTION node. See comment for
  {@link #updateGlobalNameDeclaration}.
  
  @param n An object representing a global name (e.g. "a")