def __getstate__(self):
    return {'api': self._api,
            'name': self.name,
            'path_token': self._path_with_token,
            'buffer': self._buffer,
            'buffered': self._buffered,
            'written': self._written,
            'offset': self._offset,
            'closed': self.closed}
for a simple aggregate
dataset/ETHPy150Open GoogleCloudPlatform/billing-export-python/cloudstorage/storage_api.py/StreamingBuffer.__getstate__--crossover with--dataset/ETHPy150Open benadida/helios-server/helios/utils.py/one_val_raw_sql