def object_hook(dct):
    if dct.get('__type__') in ['Size', 'cropduster.resizing.Size']:
        return Size(
            name=dct.get('name'),
            w=dct.get('w'),
            h=dct.get('h'),
            min_w=dct.get('min_w'),
            min_h=dct.get('min_h'),
            max_w=dct.get('max_w'),
            max_h=dct.get('max_h'),
            retina=dct.get('retina'),
            auto=dct.get('auto'),
            required=dct.get('required'))
    return dct
dataset/ETHPy150Open theatlantic/django-cropduster/cropduster/utils/jsonutils.py/object_hook/original