human
Give me a the Python code you requested given the following:
Complete the below
@public
def error(uri):

    ''''Decorator for WAMP error classes.'
    '''
assistant
#Here is the Python code you requested.
    def decorate(cls):
        assert issubclass(cls, Exception)
        if (not hasattr(cls, '_wampuris')):
            cls._wampuris = []
        cls._wampuris.append(Pattern(uri, Pattern.URI_TARGET_EXCEPTION))
        return cls
    return decorate