code: public static synchronized PushNotificationsManager getInstanceFor(XMPPConnection connection) {
          PushNotificationsManager pushNotificationsManager = INSTANCES.get(connection);
  
          if (pushNotificationsManager == null) {
              pushNotificationsManager = new PushNotificationsManager(connection);
              INSTANCES.put(connection, pushNotificationsManager);
          }
  
          return pushNotificationsManager;
      }
docs: Get the singleton instance of PushNotificationsManager.
  
  @param connection
  @return the instance of PushNotificationsManager