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