human
Complete this python program:
def implemented_by_base_exception(func):
assistant
#Here is the Python program you requested.

    """Call a prefixed function based on \namespace\.
    """
    @wraps(func)
    def wrapper(cls, *args, **kwargs):
        fun_name = func.__name__
        fun = ('_%s%s' % (cls.rule_group, fun_name))
        if (not hasattr(cls, fun)):
            fun = ('_default%s' % fun_name)
        return getattr(cls, fun)(*args, **kwargs)
    return wrapper