def __getstate__(self):
        # weakref.proxy don't pickle well, so we use weakref.ref
        # manually and don't pickle the weakref.
        # We restore the weakref when we unpickle.
        ret = [self.prev(), self.next()]
        try:
            ret.append(self.key)
        except __HOLE__:
            pass
        return ret
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/misc/ordered_set.py/Link.__getstate__