'Make sure we are preferring threads.
We do this by assessing that at least 2 CPUs went to the same core
if that was even possible to begin with.'

def assertPinningPreferThreads(self, instance_cell, host_cell):

    max_free_siblings = max(map(len, host_cell.free_siblings))
    if ((len(instance_cell) > 1) and (max_free_siblings > 1)):
        cpu_to_sib = {}
        for sib in host_cell.free_siblings:
            for cpu in sib:
                cpu_to_sib[cpu] = tuple(sorted(sib))
        pins_per_sib = collections.defaultdict(int)
        for (inst_p, host_p) in instance_cell.cpu_pinning.items():
            pins_per_sib[cpu_to_sib[host_p]] += 1
        self.assertGreater(max(pins_per_sib.values()), 1, 'Seems    threads    were    not    preferred    by    the    pinning    logic.')
