docs: private long applyOpenSession(Indexed<OpenSessionEntry> entry) {
      PrimitiveType primitiveType = raft.getPrimitiveTypes().getPrimitiveType(entry.entry().serviceType());
  
      // Get the state machine executor or create one if it doesn't already exist.
      RaftServiceContext service = getOrInitializeService(
          PrimitiveId.from(entry.index()),
          primitiveType,
          entry.entry().serviceName(),
          entry.entry().serviceConfig());
  
      if (service == null) {
        throw new RaftException.UnknownService("Unknown service type " + entry.entry().serviceType());
      }
  
      SessionId sessionId = SessionId.from(entry.index());
      RaftSession session = raft.getSessions().addSession(new RaftSession(
          sessionId,
          MemberId.from(entry.entry().memberId()),
          entry.entry().serviceName(),
          primitiveType,
          entry.entry().readConsistency(),
          entry.entry().minTimeout(),
          entry.entry().maxTimeout(),
          entry.entry().timestamp(),
          service.serializer(),
          service,
          raft,
          threadContextFactory));
      return service.openSession(entry.index(), entry.entry().timestamp(), session);
    }