private static @NotNull LongRangeSet tryFilterByOuterCall(@NotNull PsiCallExpression innermostCall,
                                                            @NotNull PsiExpression @NotNull [] args,
                                                            @NotNull LongRangeSet innerCounts) {
    PsiExpressionList outerArgList = ObjectUtils.tryCast(innermostCall.getParent(), PsiExpressionList.class);
    if (outerArgList != null) {
      PsiExpression[] outerArgs = outerArgList.getExpressions();
      if (innermostCall == ArrayUtil.getLastElement(outerArgs)) {
        PsiCallExpression outerCall = ObjectUtils.tryCast(outerArgList.getParent(), PsiCallExpression.class);
        if (outerCall != null) {
          LongRangeSet outerCounts = getPossibleParameterCounts(outerCall);
          if (!outerCounts.isEmpty()) {
            LongRangeSet allowedByOuter =
              LongRangeSet.point(args.length).minus(
                outerCounts.minus(LongRangeSet.point(outerArgs.length), LongRangeType.INT32), LongRangeType.INT32);
            LongRangeSet innerCountsFiltered = innerCounts.meet(allowedByOuter);
            if (!innerCountsFiltered.isEmpty()) {
              return innerCountsFiltered;
            }
          }
        }
      }
    }
    return innerCounts;
  }
private static @NotNull LongRangeSet tryFilterByOuterCall(@NotNull PsiCallExpression innermostCall,
                                                            @NotNull PsiExpression @NotNull [] args,
                                                            @NotNull LongRangeSet innerCounts)