def reify_object(o, s):

    obj = object.__new__(type(o))
    d = reify(o.__dict__, s)
    if d == o.__dict__:
        return o
    obj.__dict__.update(d)
    return obj
Reify a Python object with a substitution
dataset/ETHPy150Open logpy/logpy/logpy/unifymore.py/reify_object