<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def valid_action_request(method):
 """ wraps method with verification for is_request_valid"""


    @functools.wraps(method)
    def _wrapper(self, *args, **kwargs):
        assert isinstance(self, BaseRequestHandler)
        if not self.is_request_valid:
            return self.reply_bad_request()

        try:
            return method(self, *args, **kwargs)
        except UserWarning as e:
            return self.reply_server_error(e)
        except Exception as e:
            return self.reply_server_error(e)

    return _wrapper