def dispatch_request(self, body):
req_type = body.get('<STR_LIT>', {}).get('<STR_LIT:type>')<EOL>session_obj = body.get('<STR_LIT>')<EOL>session = Session(session_obj) if session_obj else None<EOL>if req_type == '<STR_LIT>':<EOL><INDENT>return self.launch_fn(session)<EOL><DEDENT>elif req_type == '<STR_LIT>':<EOL><INDENT>intent = body['<STR_LIT>']['<STR_LIT>']['<STR_LIT:name>']<EOL>intent_fn = self.intent_map.get(intent, self.unknown_intent_fn)<EOL>slots = {<EOL>slot['<STR_LIT:name>']: slot.get('<STR_LIT:value>')<EOL>for _, slot in<EOL>body['<STR_LIT>']['<STR_LIT>'].get('<STR_LIT>', {}).items()<EOL>}<EOL>arity = intent_fn.__code__.co_argcount<EOL>if arity == <NUM_LIT:2>:<EOL><INDENT>return intent_fn(slots, session)<EOL><DEDENT>return intent_fn()<EOL><DEDENT>elif req_type == '<STR_LIT>':<EOL><INDENT>return self.session_end_fn()<EOL><DEDENT>log.error('<STR_LIT>', req_type)<EOL>raise ValueError('<STR_LIT>', body)<EOL>
Given a parsed JSON request object, call the correct Intent, Launch,
        or SessionEnded function.

        This function is called after request parsing and validaion and will
        raise a `ValueError` if an unknown request type comes in.

        :param body: JSON object loaded from incoming request's POST data.