docs: public static PubSubManager getInstanceFor(XMPPConnection connection, BareJid pubSubService) {
      // CHECKSTYLE:ON:RegexpSingleline
          if (pubSubService != null && connection.isAuthenticated() && connection.getUser().asBareJid().equals(pubSubService)) {
              // PEP service.
              pubSubService = null;
          }
  
          PubSubManager pubSubManager;
          Map<BareJid, PubSubManager> managers;
          synchronized (INSTANCES) {
              managers = INSTANCES.get(connection);
              if (managers == null) {
                  managers = new HashMap<>();
                  INSTANCES.put(connection, managers);
              }
          }
          synchronized (managers) {
              pubSubManager = managers.get(pubSubService);
              if (pubSubManager == null) {
                  pubSubManager = new PubSubManager(connection, pubSubService);
                  managers.put(pubSubService, pubSubManager);
              }
          }
  
          return pubSubManager;
      }