def METHOD_NAME(account, msg_list):
    """wait for one or more MSG_DELIVERED events to match msg_list contents."""
    msg_list = list(msg_list)
    while msg_list:
        ev = account._evtracker.get_matching("DC_EVENT_MSG_DELIVERED")
        msg_list.remove((ev.data1, ev.data2))