<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def iter_prefix(reader, key):
 """ Creates an iterator which iterates over lines that start with prefix 'key' in a sorted text file. """


    return itertools.takewhile(
        lambda line: line.startswith(key),
        search(reader, key))