'Determine if the guest / host topology implies the
use of huge pages for guest RAM backing'

def _wants_hugepages(self, host_topology, instance_topology):

    if ((host_topology is None) or (instance_topology is None)):
        return False
    avail_pagesize = [page.size_kb for page in host_topology.cells[0].mempages]
    avail_pagesize.sort()
    avail_pagesize = avail_pagesize[1:]
    for cell in instance_topology.cells:
        if ((cell.pagesize is not None) and (cell.pagesize in avail_pagesize)):
            return True
    return False
