<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def collect_hypervisors_metrics( self, servers, custom_tags=None, use_shortname=False, collect_hypervisor_metrics=True, collect_hypervisor_load=False, ):
 """ Submits stats for all hypervisors registered to this control plane Raises specific exceptions based on response code """

        # Create a dictionary with hypervisor hostname as key and the list of project names as value
        hyp_project_names = defaultdict(set)
        for server in itervalues(servers):
            hypervisor_hostname = server.get('hypervisor_hostname')
            if not hypervisor_hostname:
                self.log.debug(
                    "hypervisor_hostname is None for server %s. Check that your user is an administrative users.",
                    server['server_id'],
                )
            else:
                hyp_project_names[hypervisor_hostname].add(server['project_name'])

        hypervisors = self.get_os_hypervisors_detail()
        for hyp in hypervisors:
            self.get_stats_for_single_hypervisor(
                hyp,
                hyp_project_names,
                custom_tags=custom_tags,
                use_shortname=use_shortname,
                collect_hypervisor_metrics=collect_hypervisor_metrics,
                collect_hypervisor_load=collect_hypervisor_load,
            )
        if not hypervisors:
            self.warning("Unable to collect any hypervisors from Nova response.")