docs: public static synchronized UIServer getInstance(boolean multiSession, Function<String, StatsStorage> statsStorageProvider)
          throws RuntimeException {
          if (uiServer == null || uiServer.isStopped()) {
              PlayUIServer playUIServer = new PlayUIServer(PlayUIServer.DEFAULT_UI_PORT, multiSession);
              playUIServer.setMultiSession(multiSession);
              if (statsStorageProvider != null) {
                  playUIServer.autoAttachStatsStorageBySessionId(statsStorageProvider);
              }
              playUIServer.runMain(new String[] {});
              uiServer = playUIServer;
          } else if (!uiServer.isStopped()) {
              if (multiSession && !uiServer.isMultiSession()) {
                  throw new RuntimeException("Cannot return multi-session instance." +
                          " UIServer has already started in single-session mode at " + uiServer.getAddress() +
                          " You may stop the UI server instance, and start a new one.");
              } else if (!multiSession && uiServer.isMultiSession()) {
                  throw new RuntimeException("Cannot return single-session instance." +
                          " UIServer has already started in multi-session mode at " + uiServer.getAddress() +
                          " You may stop the UI server instance, and start a new one.");
              }
          }
          return uiServer;
      }