def METHOD_NAME(self, data, tags, max_subscribers, detailed_subscribers):
    root = ElementTree.fromstring(data)
    # if subscribers list provided in config, only send those metrics
    if detailed_subscribers:
        subscribers = [s for s in root.findall("subscriber") if s.get("clientId") in detailed_subscribers]
    else:
        subscribers = [s for s in root.findall("subscriber") if s.get("clientId")]
    count = len(subscribers)
    if count > max_subscribers:
        if not detailed_subscribers:
            self.warning(
                "Number of subscribers is too high (%s > %s)."
                "Please use the detailed_subscribers parameter "
                "to list the %s you want to monitor.",
                count,
                max_subscribers,
                count,
            )
    for subscriber in subscribers[:max_subscribers]:
        clientId = subscriber.get("clientId")
        if not clientId:
            continue
        subscribers.append(clientId)
        stats = subscriber.find("stats")
        if stats is None:
            continue
        el_tags = tags + ["clientId:{0}".format(clientId)]
        for name in SUBSCRIBER_TAGS:
            value = subscriber.get(name)
            if value is not None:
                el_tags.append("%s:%s" % (name, value))
        pending_queue_size = stats.get("pendingQueueSize", 0)
        dequeue_counter = stats.get("dequeueCounter", 0)
        enqueue_counter = stats.get("enqueueCounter", 0)
        dispatched_queue_size = stats.get("dispatchedQueueSize", 0)
        dispatched_counter = stats.get("dispatchedCounter", 0)
        self.log.debug(
            "ActiveMQ Subscriber %s: %s %s %s %s %s",
            clientId,
            pending_queue_size,
            dequeue_counter,
            enqueue_counter,
            dispatched_queue_size,
            dispatched_counter,
        )
        self.gauge("activemq.subscriber.pending_queue_size", pending_queue_size, tags=el_tags)
        self.gauge("activemq.subscriber.dequeue_counter", dequeue_counter, tags=el_tags)
        self.gauge("activemq.subscriber.enqueue_counter", enqueue_counter, tags=el_tags)
        self.gauge("activemq.subscriber.dispatched_queue_size", dispatched_queue_size, tags=el_tags)
        self.gauge("activemq.subscriber.dispatched_counter", dispatched_counter, tags=el_tags)
    self.log.debug("ActiveMQ Subscriber Count: %s", count)
    self.gauge("activemq.subscriber.count", count, tags=tags)