<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def make_view(self, action_group):
 """ Create a view function Check permission and Dispatch request to action by request.method """

        def view(*args, **kwargs):
            try:
                httpmathod = request.method.lower()
                if httpmathod not in action_group:
                    abort(405)
                resp = self._before_request()
                if resp is None:
                    fn = action_group[httpmathod]
                    resp = fn(get_request_data())
            except Exception as ex:
                resp = self._handle_error(ex)
                if resp is None:
                    raise
            resp = self._after_request(*unpack(resp))
            return export(*resp)
        return view