@staticmethod
def _call_hooks(obj, hooks):
    """ Calls a series of callbacks """
    if not hooks:
        return obj
    for hook in hooks:
        ret = hook(obj)
        if ret is not None:
            obj = ret
    return obj
