async def METHOD_NAME(
    self, app, chat_member_updated, chat_member, expected, allowed_types
):
    result_1, result_2 = expected
    handler = ChatMemberHandler(self.callback, chat_member_types=allowed_types)
    app.add_handler(handler)
    async with app:
        assert handler.check_update(chat_member) == result_1
        await app.process_update(chat_member)
        assert self.test_flag == result_1
        self.test_flag = False
        chat_member.my_chat_member = None
        chat_member.chat_member = chat_member_updated
        assert handler.check_update(chat_member) == result_2
        await app.process_update(chat_member)
        assert self.test_flag == result_2