docs: private List<Message> getSearchItems(CdjStatus.TrackSourceSlot slot, int sortOrder, String text,
                                           AtomicInteger count, Client client)
              throws IOException, InterruptedException, TimeoutException {
          if (client.tryLockingForMenuOperations(MetadataFinder.MENU_TIMEOUT, TimeUnit.SECONDS)) {
              try {
                  final StringField textField = new StringField(text);
                  Message response = client.menuRequest(Message.KnownType.SEARCH_MENU, Message.MenuIdentifier.MAIN_MENU, slot,
                          new NumberField(sortOrder), new NumberField(textField.getSize()), textField, NumberField.WORD_0);
                  final int actualCount = (int)response.getMenuResultsCount();
                  if (actualCount == Message.NO_MENU_RESULTS_AVAILABLE || actualCount == 0) {
                      if (count != null) {
                          count.set(0);
                      }
                      return Collections.emptyList();
                  }
  
                  // Gather the requested number of search menu items
                  if (count == null) {
                      return client.renderMenuItems(Message.MenuIdentifier.MAIN_MENU, slot, CdjStatus.TrackType.REKORDBOX, response);
                  } else {
                      final int desiredCount = Math.min(count.get(), actualCount);
                      count.set(actualCount);
                      if (desiredCount < 1) {
                          return Collections.emptyList();
                      }
                      return client.renderMenuItems(Message.MenuIdentifier.MAIN_MENU, slot, CdjStatus.TrackType.REKORDBOX,
                              0, desiredCount);
                  }
              } finally {
                  client.unlockForMenuOperations();
              }
          } else {
              throw new TimeoutException("Unable to lock player for menu operations.");
          }
      }