def ownable(func):
    @wraps(func)
    def add_alter(obj, *args, **kwargs):
        stmts = func(obj, *args, **kwargs)
        stmts.append(obj.alter_owner())
        return stmts
    return add_alter
Decorator to add ALTER OWNER to various objects
dataset/ETHPy150Open perseas/Pyrseas/pyrseas/dbobject/__init__.py/ownable