<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _accumulate_ips_from_plugins(self, ip_type_name, plugin_queue_lookup, ip_accumulator):
 """ Retrieve all IPs of a given type from all sub-plugins. ip_type_name: A name of the type of IP we are working with. Used for nice log messages. Example 'failed', 'questionable'. plugin_queue_lookup: Dictionary to lookup the queues (of a given type) for a plugins, by plugin name. ip_accumulator: An expiring data set for this type of IP address. Returns either a set of addresses to send out on our own reporting queues, or None. """

        all_reported_ips  = set()
        for pname, q in plugin_queue_lookup.items():
            # Get all the IPs of the specified type from all the plugins.
            ips = utils.read_last_msg_from_queue(q)
            if ips:
                logging.debug("Sub-plugin '%s' reported %d "
                              "%s IPs: %s" %
                              (pname, len(ips), ip_type_name,
                               ",".join(ips)))
                all_reported_ips.update(ips)  # merge all the lists
            else:
                logging.debug("Sub-plugin '%s' reported no "
                              "%s IPs." % (pname, ip_type_name))

        # Send out the combined list of reported IPs. The receiver of this
        # message expects this list to always be the full list of IPs. So, IF
        # they get a message, it needs to be complete, since otherwise any IP
        # not mentioned in this update is considered healthy.
        #
        # Since different sub-plugins may report different IPs at different
        # times (and not always at the same time), we need to accumulate those
        # IPs that are recorded by different sub-plugins over time.
        #
        # We use an 'expiring data set' to store those: If any plugin refreshes
        # an IP as failed then the entry remains, otherwise, it will expire
        # after some time. The expiring data set therefore, is an accumulation
        # of recently reported IPs. We always report this set, whenever we send
        # out an update of IPs.
        #
        # Each type of IP (for example, 'failed' or 'questionable') has its own
        # accumulator, which was passed in to this function.
        if all_reported_ips:
            ip_accumulator.update(all_reported_ips)
            current_ips = ip_accumulator.get()
            logging.info("Multi-plugin health monitor: "
                         "Reporting combined list of %s "
                         "IPs: %s" %
                         (ip_type_name,
                          ",".join(current_ips)))
            return current_ips
        else:
            logging.debug("No failed IPs to report.")
            return None