def __getstate__(self):
        state = self.__dict__

        if hasattr(self, '_client'):
            del state['_client']