def METHOD_NAME(self, fid, perm):
    """ batch iterator"""
    if self.shuffle:
        for batch in scan_batch_iter_shuffle(self, self.batch_size, fid, self.num_workers):
            yield batch
    else:
        for batch in scan_batch_iter(self, self.batch_size, fid, self.num_workers):
            yield batch