@Nullable
  private static Map<Integer, PsiExpression> extractConditions(PsiConditionalExpression ternary) {
    Map<Integer, PsiExpression> result = new HashMap<>(3);
    if (!storeCondition(result, ternary.getCondition(), ternary.getThenExpression())) return null;
    PsiExpression elseExpression = PsiUtil.skipParenthesizedExprDown(ternary.getElseExpression());
    if (elseExpression instanceof PsiConditionalExpression) {
      Map<Integer, PsiExpression> m = extractConditions((PsiConditionalExpression)elseExpression);
      if (m == null) return null;
      for (var entry : m.entrySet()) {
        if (result.put(entry.getKey(), entry.getValue()) != null) return null;
      }
      return result;
    }
    return storeCondition(result, null, elseExpression) ? result : null;
  }
@Nullable
  private static Map<Integer, PsiExpression> extractConditions(PsiConditionalExpression ternary)