public static @Nullable PsiExpression findPatternSwitchExpression(@Nullable PsiExpression expression) {
    expression = PsiUtil.skipParenthesizedExprDown(expression);
    final PsiExpression patternOperand = findPossiblePatternOperand(expression);
    if (patternOperand != null) return patternOperand;
    final PsiExpression nullCheckedOperand = findNullCheckedOperand(expression);
    if (nullCheckedOperand != null) return nullCheckedOperand;
    if (expression instanceof PsiPolyadicExpression polyadicExpression) {
      final IElementType operationToken = polyadicExpression.getOperationTokenType();
      if (JavaTokenType.OROR.equals(operationToken)) {
        final PsiExpression[] operands = polyadicExpression.getOperands();
        if (operands.length == 2) {
          PsiExpression firstOperand = findNullCheckedOperand(operands[0]);
          PsiExpression secondOperand = findPossiblePatternOperand(operands[1]);
          if (firstOperand == null || secondOperand == null) {
            firstOperand = findPossiblePatternOperand(operands[0]);
            secondOperand = findNullCheckedOperand(operands[1]);
          }
          if (firstOperand == null || secondOperand == null) {
            return null;
          }
          if (EquivalenceChecker.getCanonicalPsiEquivalence().expressionsAreEquivalent(firstOperand, secondOperand)) {
            return firstOperand;
          }
        }
      }
    }
    return null;
  }
public static @Nullable PsiExpression findPatternSwitchExpression(@Nullable PsiExpression expression)