def METHOD_NAME(self, update):
    # Test that it's sometimes None per docstring
    eff_message = update.effective_message
    if not (
        update.inline_query is not None
        or update.chosen_inline_result is not None
        or (update.callback_query is not None and update.callback_query.message is None)
        or update.shipping_query is not None
        or update.pre_checkout_query is not None
        or update.poll is not None
        or update.poll_answer is not None
        or update.my_chat_member is not None
        or update.chat_member is not None
        or update.chat_join_request is not None
    ):
        assert eff_message.message_id == message.message_id
    else:
        assert eff_message is None