def get_sequential_batches(self, batch_size, num_batches=None):
        """Creates a sequential generator.
            Batches returned are pandas dataframes of length=batch_size.
            Note: Final batch might be of smaller size.

        Args:
            num_batches: Number of batches to generate.
            batch_size (int): Batch size.
        """

        if num_batches is None:
            num_batches = self.df.npartitions
        for i in range(num_batches):
            part = self.df.partitions[i].compute()
            for j in range(0, part.shape[0], batch_size):
                yield part.iloc[j : j + batch_size, :]
Creates a sequential generator.
            Batches returned are pandas dataframes of length=batch_size.
            Note: Final batch might be of smaller size.

        Args:
            num_batches: Number of batches to generate.
            batch_size (int): Batch size.
        
utils_nlp/dataset/data_loaders.py