<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def in_batches(iterable, batch_size):
 # type: (Iterable[Any]) -> Generator[List[Any]] """ Split the given iterable into batches. Args: iterable (Iterable[Any]):
 The iterable you want to split into batches. batch_size (int):
 The size of each bach. The last batch will be probably smaller (if the number of elements cannot be equally divided. Returns: Generator[list[Any]]: Will yield all items in batches of **batch_size** size. Example: 3 [[1, 2, 3], [4, 5, 6], [7]] """

    items = list(iterable)
    size = len(items)

    for i in range(0, size, batch_size):
        yield items[i:min(i + batch_size, size)]