def unwrap_function(func, max=10):
    iteration = 0
    wrapped =  getattr(func, "__wrapped__", None)
    while wrapped and iteration < max:
        func = wrapped
        wrapped = getattr(func, "__wrapped__", None)
        iteration += 1
    return func
Register updates that will be executed in each iteration.
dataset/ETHPy150Open behave/behave/behave/model_core.py/unwrap_function--crossover with--dataset/ETHPy150Open zomux/deepy/deepy/layers/layer.py/NeuralLayer.register_updates