async def METHOD_NAME(self, update, context):
    if context.matches[0].groups():
        self.test_flag = context.matches[0].groups() == ("t", " message")
    if context.matches[0].groupdict():
        self.test_flag = context.matches[0].groupdict() == {"begin": "t", "end": " message"}