code: private static boolean isNamespacePlaceholder(Node n) {
      if (!n.getBooleanProp(Node.IS_NAMESPACE)) {
        return false;
      }
  
      Node value = null;
      if (n.isExprResult()) {
        Node assign = n.getFirstChild();
        value = assign.getLastChild();
      } else if (n.isVar()) {
        Node name = n.getFirstChild();
        value = name.getFirstChild();
      }
  
      if (value == null) {
        return false;
      }
      if (value.isCast()) {
        // There may be a cast to unknown type wrapped around the value.
        value = value.getOnlyChild();
      }
      return value.isObjectLit() && !value.hasChildren();
    }
docs: Returns whether the node initializes a goog.provide'd namespace (e.g. `a.b = {};`) with a
  simple namespace object literal (e.g. not `a.b = class {}`;)