def get_batch(self) -> tuple:
        """
        Provide the next batch for training in the form of a tuple `(x, y)`.
            The generator will loop over the data indefinitely.
            If drop_remainder is True, then the last minibatch in each epoch may be a different size

        :return: A tuple containing a batch of data `(x, y)`.
        """
        try:
            return next(self.generator)
        except StopIteration:
            self.generator = iter(self)
            return next(self.generator)

        Provide the next batch for training in the form of a tuple `(x, y)`.
            The generator will loop over the data indefinitely.
            If drop_remainder is True, then the last minibatch in each epoch may be a different size

        :return: A tuple containing a batch of data `(x, y)`.
        
art/data_generators.py