docs: private boolean isTypeParameterThreadSafe(
        TypeVariableSymbol symbol, Set<String> containerTypeParameters) {
      if (!recursiveThreadSafeTypeParameter.add(symbol)) {
        return true;
      }
      // TODO(b/77695285): Prevent type variables that are immutable because of an immutable upper
      // bound to be marked thread-safe via containerOf or typeParameterAnnotation.
      try {
        for (Type bound : symbol.getBounds()) {
          if (!isThreadSafeType(true, containerTypeParameters, bound).isPresent()) {
            // A type variable is thread-safe if any upper bound is thread-safe.
            return true;
          }
        }
        return hasThreadSafeTypeParameterAnnotation(symbol);
      } finally {
        recursiveThreadSafeTypeParameter.remove(symbol);
      }
    }