private boolean isPureModuloFailCause(@NotNull Map<EKey, Value> solution, @NotNull EKey key, @NotNull Direction direction) throws EquationsLimitException {
    EKey pureKey = key.withDirection(Pure);
    Set<MemberDescriptor> resetKeys = StreamEx.of(
      myEquationProvider.getEquations(key.member)).mapPartial(eq -> eq.find(direction)).flatMap(Result::dependencies)
      .filter(k -> !k.getDirection().isNullFail() && solution.get(k) == Value.Fail)
      .map(k -> k.member)
      .toSet();
    if (resetKeys.isEmpty()) return false;
    PuritySolver puritySolver = collectPurityEquations(pureKey, new EquationProvider<>(myEquationProvider.myProject) {
      @Override
      EKey adaptKey(@NotNull EKey key) {
        return myEquationProvider.adaptKey(key);
      }

      @Override
      List<Equations> getEquations(MemberDescriptor method) {
        if (resetKeys.contains(method)) {
          return Collections.singletonList(new Equations(Collections.singletonList(
            new DirectionResultPair(Pure.asInt(), new Effects(DataValue.UnknownDataValue2, Collections.emptySet()))), true));
        }
        return myEquationProvider.getEquations(method);
      }
    });
    Map<EKey, Effects> solve = puritySolver.solve();
    Effects effects = solve.get(pureKey);
    return effects != null && !effects.isTop() && effects.effects.isEmpty();
  }
private boolean isPureModuloFailCause(@NotNull Map<EKey, Value> solution, @NotNull EKey key, @NotNull Direction direction)