private static void ensureNullabilityAnnotationsDoNotRepeat(@NotNull PsiTypeElement element, PsiType newType) {
    PsiElement parent = element.getParent();
    if (parent instanceof PsiModifierListOwner owner &&
        newType != null &&
        ContainerUtil.exists(newType.getAnnotations(), annotation -> NullableNotNullManager.isNullabilityAnnotation(annotation))) {
      Arrays.stream(owner.getAnnotations())
        .filter(NullableNotNullManager::isNullabilityAnnotation)
        .forEach(PsiElement::delete);
    }
  }
private static void ensureNullabilityAnnotationsDoNotRepeat(@NotNull PsiTypeElement element, PsiType newType)