<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def next(self) -> mx.io.DataBatch: """ Returns the next batch. """

        if self.iter_next():
            return self.next_batch
        raise StopIteration