docs: private Type immutableSupertype(Symbol sym, VisitorState state) {
      for (Type superType : state.getTypes().closure(sym.type)) {
        if (superType.tsym.equals(sym.type.tsym)) {
          continue;
        }
        // Don't use getImmutableAnnotation here: subtypes of trusted types are
        // also trusted, only check for explicitly annotated supertypes.
        if (immutableAnnotations.stream()
            .anyMatch(annotation -> ASTHelpers.hasAnnotation(superType.tsym, annotation, state))) {
          return superType;
        }
        // We currently trust that @interface annotations are immutable, but don't enforce that
        // custom interface implementations are also immutable. That means the check can be
        // defeated by writing a custom mutable annotation implementation, and passing it around
        // using the superclass type.
        //
        // TODO(b/25630189): fix this
        //
        // if (superType.tsym.getKind() == ElementKind.ANNOTATION_TYPE) {
        //   return superType;
        // }
      }
      return null;
    }