def filter_hosts(self, topic, request_spec, host_list):
        def basic_ram_filter(hostname, capabilities, request_spec):
            """Only return hosts with sufficient available RAM."""
            instance_type = request_spec['instance_type']
            requested_mem = instance_type['memory_mb'] * 1024 * 1024
            return capabilities['host_memory_free'] >= requested_mem

        return [(host, services) for host, services in host_list
                if basic_ram_filter(host, services, request_spec)]
Filter the full host list returned from the ZoneManager. By default,
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/scheduler/abstract_scheduler.py/AbstractScheduler.filter_hosts