@Contract(pure = true)
  public static boolean isRuleFormatSwitch(@NotNull PsiSwitchBlock block) {
    if (!PsiUtil.isAvailable(JavaFeature.ENHANCED_SWITCH, block)) {
      return false;
    }

    final PsiCodeBlock switchBody = block.getBody();
    if (switchBody != null) {
      for (var child = switchBody.getFirstChild(); child != null; child = child.getNextSibling()) {
        if (child instanceof PsiSwitchLabelStatementBase && !isBeingCompleted((PsiSwitchLabelStatementBase)child)) {
          return child instanceof PsiSwitchLabeledRuleStatement;
        }
      }
    }

    return true;
  }
@Contract(pure = true)
  public static boolean isRuleFormatSwitch(@NotNull PsiSwitchBlock block)