private static @NotNull List<PsiTypeCastExpression> getRelatesCastExpressions(PsiElement expression, PsiInstanceOfExpression targetInstanceOf) {
    return SyntaxTraverser.psiTraverser(expression)
      .filter(PsiTypeCastExpression.class)
      .filter(cast -> InstanceOfUtils.findPatternCandidate(cast) == targetInstanceOf)
      .toList();
  }
private static @NotNull List<PsiTypeCastExpression> getRelatesCastExpressions(PsiElement expression, PsiInstanceOfExpression targetInstanceOf)