async def check(ev: EventBase, state):
     d = ev.get_dict()
     d["content"] = {
         "msgtype": "m.text",
         "body": d["content"]["body"].upper(),
     }
     return True, d
 async def check_event_allowed(self, event: EventBase,
                               state: StateMap[EventBase]):
     d = event.get_dict()
     content = unfreeze(event.content)
     content["foo"] = "bar"
     d["content"] = content
     return d
 async def check(
         ev: EventBase,
         state: StateMap[EventBase]) -> Tuple[bool, Optional[JsonDict]]:
     d = ev.get_dict()
     d["content"] = {
         "msgtype": "m.text",
         "body": d["content"]["body"].upper(),
     }
     return True, d
 async def check(ev: EventBase, state):
     d = ev.get_dict()
     d["content"] = {"x": "y"}
     return d
 async def check(
         ev: EventBase,
         state: StateMap[EventBase]) -> Tuple[bool, Optional[JsonDict]]:
     d = ev.get_dict()
     d["content"] = {"x": "y"}
     return True, d