public static boolean isNewified(@Nullable PsiElement expr) {
    if (!(expr instanceof GrReferenceExpression refExpr)) {
      return false;
    }
    if (!expr.isValid()) {
      return false;
    }
    if (refExpr.isQualified()) {
      return false;
    }
    String referenceName = refExpr.getReferenceName();
    if (referenceName == null) {
      return false;
    }
    List<PsiAnnotation> newifyAnnotations = NewifyMemberContributor.getNewifyAnnotations(expr);
    for (PsiAnnotation anno : newifyAnnotations) {
      if (NewifyMemberContributor.matchesPattern(referenceName, anno)) {
        return true;
      }
      List<PsiClass> selectedClasses = GrAnnotationUtil.getClassArrayValue(anno, "value", true);
      if (selectedClasses.stream().anyMatch(clazz -> referenceName.equals(clazz.getName()))) {
        return true;
      }
    }
    return false;
  }
public static boolean isNewified(@Nullable PsiElement expr)