def METHOD_NAME(sleep_time, wait_time):
    time_last = 0
    while True:
        value = int(utils_memory.read_from_meminfo("AnonHugePages"))
        nr_hugepages.append(value)
        time_stamp = time.time()
        if time_last != 0:
            if nr_hugepages[-2] != nr_hugepages[-1]:
                time_last = time_stamp
            elif time_stamp - time_last > wait_time:
                test.log.info("Huge page size stop changed")
                break
        else:
            time_last = time_stamp
        time.sleep(sleep_time)