private int calculateNumElements(PsiExpression expression) {
      if (expression instanceof PsiArrayInitializerExpression arrayExpression) {
        final PsiExpression[] initializers =
          arrayExpression.getInitializers();
        return Arrays.stream(initializers).mapToInt(this::calculateNumElements).sum();
      }
      return 1;
    }
private int calculateNumElements(PsiExpression expression)