keras/src/trainers/data_adapters/py_dataset_adapter.py/PyDatasetAdapter/_get_iterator
class PyDatasetAdapter:    def _get_iterator(self):
        num_batches = self.py_dataset.num_batches
        gen_fn = self._make_multiprocessed_generator_fn()
        for i, batch in enumerate(gen_fn()):
            batch = self._standardize_batch(batch)
            yield batch
            if (
                self.enqueuer
                and num_batches is not None
                and i >= num_batches - 1
            ):
                self.enqueuer.stop()