def METHOD_NAME(query, verbosity, expected_count):
    """
    Compares expected_count to count_mmaps return, and returns RET_SUCCESS in FUNC
    for handling in mmap_tester.c, map_count()
    """
    if query == BUSY_MMAPS:
        mmap = gdb.parse_and_eval("&machine.mmaps.busy")
        ret = count_mmaps(mmap, verbosity)
    elif query == FREE_MMAPS:
        mmap = gdb.parse_and_eval("&machine.mmaps.free")
        ret = count_mmaps(mmap, verbosity)
    elif query == TOTAL_MMAPS:
        mmap = gdb.parse_and_eval("&machine.mmaps.free")
        ret = count_mmaps(mmap, verbosity)
        mmap = gdb.parse_and_eval("&machine.mmaps.busy")
        ret = ret + count_mmaps(mmap, verbosity)
    else:
        ret = expected_count + 1
        gdb.write("Invalid query: ", query)
    if ret == expected_count:
        gdb.execute(f"return {RET_SUCCESS}")
    else:
        # ENOPIPE ernno = 29
        gdb.execute(f"return -{ESPIPE}")