code: async def handle_action(self, action: str, request_id: str, **kwargs):
          
          try:
              await self.check_permissions(action, **kwargs)
  
              if action not in self.available_actions:
                  raise MethodNotAllowed(method=action)
  
              method_name = self.available_actions[action]
              method = getattr(self, method_name)
  
              reply = partial(self.reply, action=action, request_id=request_id)
  
              # the @action decorator will wrap non-async action into async ones.
  
              response = await method(
                  request_id=request_id,
                  action=action,
                  **kwargs
              )
  
              if isinstance(response, tuple):
                  data, status = response
                  await reply(
                      data=data,
                      status=status
                  )
  
          except Exception as exc:
              await self.handle_exception(
                  exc,
                  action=action,
                  request_id=request_id
              )
docs: run the action.