private static Nullability inferNullability(@NotNull PsiCodeBlock block, @NotNull PsiExpression expr) {
    final var dfaRunner = new StandardDataFlowRunner(block.getProject());

    var interceptor = new JavaDfaListener() {
      DfaNullability myNullability = DfaNullability.NOT_NULL;
      boolean myVisited = false;

      @Override
      public void beforeExpressionPush(@NotNull DfaValue value,
                                       @NotNull PsiExpression expression,
                                       @NotNull DfaMemoryState state) {
        if (expression == expr) {
          myVisited = true;
          myNullability = myNullability.unite(DfaNullability.fromDfType(state.getDfType(value)));
        }
      }
    };
    final RunnerResult rc = dfaRunner.analyzeMethod(block, interceptor);
    return rc == RunnerResult.OK && interceptor.myVisited ? DfaNullability.toNullability(interceptor.myNullability) : Nullability.UNKNOWN;
  }
private static Nullability inferNullability(@NotNull PsiCodeBlock block, @NotNull PsiExpression expr)