private static <T extends PsiElement> @NotNull T stripAnnotations(@NotNull T element) {
    @SuppressWarnings("unchecked") T result = (T)element.copy();
    result.accept(new PyRecursiveElementVisitor() {
      @Override
      public void visitPyAnnotation(@NotNull PyAnnotation node) {
        node.delete();
      }
    });
    return result;
  }
private static <T extends PsiElement> @NotNull T stripAnnotations(@NotNull T element)