<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stop_at(iterable, idx):
 """Stops iterating before yielding the specified idx."""

    for i, item in enumerate(iterable):
        if i == idx: return
        yield item