    def __getstate__(self):
        """Called on pickle save"""
        self.disconnect()
        state = self.__dict__.copy()
        assert state["_client"] is None
        assert "object_id" in state
        return state
Called on pickle save
fairseq/data/plasma_utils.py