def METHOD_NAME(self, args):
    offset, header, index, to_csv_kwargs = args
    batch = query_table(
        table=self.dataset.data,
        key=slice(offset, offset + self.batch_size),
        indices=self.dataset._indices,
    )
    csv_str = batch.to_pandas().to_csv(
        path_or_buf=None, header=header if (offset == 0) else False, index=index, **to_csv_kwargs
    )
    return csv_str.encode(self.encoding)