async def _handle_message(self,<EOL>message: BaseMessage,<EOL>responder: Responder) -> Optional[Dict]:
async def noop(request: Request, responder: Responder):<EOL><INDENT>pass<EOL><DEDENT>mm = MiddlewareManager.instance()<EOL>reg_manager = self.register.work_on_register(message.get_conversation().id)<EOL>async with reg_manager as reg:<EOL><INDENT>request = Request(message, reg)<EOL>await request.transform()<EOL>if not request.stack.layers:<EOL><INDENT>return<EOL><DEDENT>logger.debug('<STR_LIT>', request.stack)<EOL>await mm.get('<STR_LIT>', noop)(request, responder)<EOL>try:<EOL><INDENT>state, trigger, dnr =await self._build_state(request, message, responder)<EOL><DEDENT>except Exception:<EOL><INDENT>logger.exception('<STR_LIT>',<EOL>reg.get(Register.STATE))<EOL>reporter.report(request, None)<EOL>return<EOL><DEDENT>if state is None:<EOL><INDENT>logger.debug(<EOL>'<STR_LIT>',<EOL>request.message,<EOL>)<EOL>return<EOL><DEDENT>state = await self._run_state(responder, state, trigger, request)<EOL>try:<EOL><INDENT>await responder.flush(request)<EOL><DEDENT>except MissingTranslationError as e:<EOL><INDENT>responder.clear()<EOL>responder.send([RawText(str(e))])<EOL>await responder.flush(request)<EOL>reporter.report(request, state.name())<EOL>logger.exception('<STR_LIT>',<EOL>state.name())<EOL><DEDENT>except Exception:<EOL><INDENT>reporter.report(request, state.name())<EOL>logger.exception('<STR_LIT>',<EOL>state.name())<EOL><DEDENT>else:<EOL><INDENT>if not dnr:<EOL><INDENT>reg.replacement = await self._build_state_register(<EOL>state,<EOL>request,<EOL>responder,<EOL>)<EOL><DEDENT>return reg.replacement<EOL><DEDENT><DEDENT>
Handles a message: find a state and run it.

:return: The register that was saved