@Nullable
  private static GrConditionalExpression findTernary(PsiElement element) {
    GrConditionalExpression ternary = PsiTreeUtil.getParentOfType(element, GrConditionalExpression.class);
    if (ternary == null) {
      GrReturnStatement ret = PsiTreeUtil.getParentOfType(element, GrReturnStatement.class);
      if (ret != null && ret.getReturnValue() instanceof GrConditionalExpression value) {
        return value;
      }
    }
    return ternary;
  }
@Nullable
  private static GrConditionalExpression findTernary(PsiElement element)