<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gen_list_name():
 """Generate "keys" for encoded lists in the sequence The first 1000 keys are returned from a pre-built cache. All subsequent keys are generated on the fly. """

    for name in _LIST_NAMES:
        yield name

    counter = itertools.count(1000)
    while True:
        yield b(str(next(counter))) + b"\x00"