def METHOD_NAME(mem_size, hugepage_num, pagesize):
    cmd = 'grep -B1 %s /proc/`pidof qemu-kvm`/smaps' % mem_size
    out = process.run(cmd, shell=True, verbose=True).stdout_text.strip()
    matches = re.findall('(\w+)-', out)
    if not matches:
        test_obj.test.fail("Fail to find the pattern '(\w+)-' in smaps output '%s'" % out)
    cmd = 'grep %s /proc/`pidof qemu-kvm`/numa_maps' % matches[0]
    out_numa_maps = process.run(cmd, shell=True, verbose=True).stdout_text.strip()
    pat = r"huge anon=%s.*kernelpagesize_kB=%s" % (hugepage_num, pagesize)
    if not re.search(pat, out_numa_maps):
        test_obj.test.fail("Fail to find the pattern '%s' in "
                           "numa_maps output '%s'" % (pat,
                                                      out_numa_maps))