@Nullable
    private static RedundantCastUtil.MyIsRedundantVisitor.ParentPathContext getContextParent(@NotNull PsiCall expression) {
      PsiElement parent = expression.getParent();
      List<Integer> indexes = new ArrayList<>();
      PsiElement currentChild = expression;
      while (parent instanceof PsiIfStatement || parent instanceof PsiConditionalExpression || parent instanceof PsiLoopStatement) {
        PsiElement[] children = parent.getChildren();
        PsiElement finalCurrentChild = currentChild;
        int index = ContainerUtil.indexOf(Arrays.asList(children), child -> child == finalCurrentChild);
        if (index != -1) {
          indexes.add(index);
        }
        else {
          return null;
        }
        currentChild = parent;
        parent = parent.getParent();
      }
      return new ParentPathContext(currentChild, indexes);
    }
@Nullable
    private static RedundantCastUtil.MyIsRedundantVisitor.ParentPathContext getContextParent(@NotNull PsiCall expression)