docs: public static ServerStats parseBytes(byte[] serialized)
        throws ServerStatsDeserializationException {
      final ByteBuffer bb = ByteBuffer.wrap(serialized);
      bb.order(ByteOrder.LITTLE_ENDIAN);
      long serviceLatencyNs = 0L;
      long lbLatencyNs = 0L;
      byte traceOption = (byte) 0;
  
      // Check the version first.
      if (!bb.hasRemaining()) {
        throw new ServerStatsDeserializationException("Serialized ServerStats buffer is empty");
      }
      byte version = bb.get();
  
      if (version > CURRENT_VERSION || version < 0) {
        throw new ServerStatsDeserializationException("Invalid ServerStats version: " + version);
      }
  
      while (bb.hasRemaining()) {
        ServerStatsFieldEnums.Id id = ServerStatsFieldEnums.Id.valueOf((int) bb.get() & 0xFF);
        if (id == null) {
          // Skip remaining;
          bb.position(bb.limit());
        } else {
          switch (id) {
            case SERVER_STATS_LB_LATENCY_ID:
              lbLatencyNs = bb.getLong();
              break;
            case SERVER_STATS_SERVICE_LATENCY_ID:
              serviceLatencyNs = bb.getLong();
              break;
            case SERVER_STATS_TRACE_OPTION_ID:
              traceOption = bb.get();
              break;
          }
        }
      }
      try {
        return ServerStats.create(lbLatencyNs, serviceLatencyNs, traceOption);
      } catch (IllegalArgumentException e) {
        throw new ServerStatsDeserializationException(
            "Serialized ServiceStats contains invalid values: " + e.getMessage());
      }
    }