

def __gluestate__(self, context):
    return dict(data=[(k, context.id(v)) for (k, v) in self.__dict__.items()])

dataset/ETHPy150Open glue-viz/glue/glue/viewers/custom/qt/custom_viewer.py ViewerState.__gluestate__/original