def payload_override(payload_name):

    def decorator(method):

        @functools.wraps(method)
        def decorated(self, *args, **kwargs):
            try:
                return self.payload[payload_name]
            except KeyError:
                return method(self, *args, **kwargs)
        return decorated
    return decorator
def payload_override(payload_name):

    def decorator(method):

        @functools.wraps(method)
        def decorated(self, *args, **kwargs):
            try:
                return self.payload[payload_name]
            except KeyError:
                return method(self, *args, **kwargs)
        return decorated
    return decorator