private static boolean forStatementAssignsVariableOrFails(@NotNull PsiForStatement forStatement, PsiVariable variable,
                                                            @NotNull Set<MethodSignature> checkedMethods, boolean strict) {
    if (statementAssignsVariableOrFails(forStatement.getInitialization(), variable, checkedMethods, strict)) {
      return true;
    }
    final PsiExpression condition = forStatement.getCondition();
    if (expressionAssignsVariableOrFails(condition, variable, checkedMethods, strict)) {
      return true;
    }
    if (BoolUtils.isTrue(condition)) {
      if (statementAssignsVariableOrFails(forStatement.getBody(), variable, checkedMethods, strict)) {
        return true;
      }
      return statementAssignsVariableOrFails(forStatement.getUpdate(), variable, checkedMethods, strict);
    }
    return false;
  }
private static boolean forStatementAssignsVariableOrFails(@NotNull PsiForStatement forStatement, PsiVariable variable,
                                                            @NotNull Set<MethodSignature> checkedMethods, boolean strict)