def METHOD_NAME(messages):
    """
    Returns the total queued time for a a collection of messages.
    """
    accum_time = 0
    for msg in getIterable(messages):
        if isinstance(msg, list):
            for elt in msg:
                accum_time += elt.getQueuedTime()
        else:
            accum_time += msg.getQueuedTime()
    return accum_time