private static boolean hasPeekCallBefore(@NotNull PsiMethodCallExpression call) {
    PsiMethodCallExpression qualifierCall = getQualifierMethodCall(call);
    while (qualifierCall != null &&
           TypeUtils.expressionHasTypeOrSubtype(qualifierCall, CommonClassNames.JAVA_UTIL_STREAM_STREAM) &&
           !STREAM_PEEK.test(qualifierCall)) {
      qualifierCall = getQualifierMethodCall(qualifierCall);
    }
    return STREAM_PEEK.test(qualifierCall);
  }
private static boolean hasPeekCallBefore(@NotNull PsiMethodCallExpression call)