<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def batch(iterable, chunk_size):
 """ Return items from iterable in chunk_size bits. If len(iterable) % chunk_size > 0, the last item returned will be shorter. """

    i = iter(iterable)
    while True:
        r = list(itertools.islice(i, chunk_size))
        if not r:
            break
        yield r