code: private <T> ImmutableList<Case<T>> compactCases(ImmutableList<Case<T>> cases, T defaultCaseSpec) {
      // Determine the fallback/other case value.
      ImmutableList<SoyMsgPart> defaultValue = null;
      for (Case<T> caseAndValue : cases) {
        if (Objects.equals(caseAndValue.spec(), defaultCaseSpec)) {
          defaultValue = caseAndValue.parts();
          break;
        }
      }
  
      ImmutableList.Builder<Case<T>> builder = ImmutableList.builder();
      for (Case<T> caseAndValue : cases) {
  
        // See if this case is the same as the default/other case, but isn't itself the default/other
        // case, and can be pruned.
        if (defaultValue != null
            && !Objects.equals(caseAndValue.spec(), defaultCaseSpec)
            && defaultValue.equals(caseAndValue.parts())) {
          continue;
        }
  
        // Intern the case value, since they tend to be very common among templates. For select,
        // they tend to be strings like "male" or "female", and for plurals, it tends to be one
        // of the few in the enum.
        builder.add(
            Case.create(
                caseAndValue.spec() != null ? intern(caseAndValue.spec()) : null,
                compactParts(caseAndValue.parts())));
      }
      return builder.build();
    }
docs: Recursively compacts plural/select cases.
  
  <p>This will attempt to remove unnecessary cases that can easily fall back to the default.
  
  @param cases Mapping (as pairs) from case spec to the message parts for that case.
  @param defaultCaseSpec The default or "other" case specification value.