def finalizeCommands(model_object, commands, desc=None):
    """Used to enable interaction with the model but not push
    commands to the undostack.  In practice:

    1. Call a bunch of commands and don't push them to the undostack AKA:
        cmd.redo()
    2. call finalizeCommands() to push the cummulative change to the stack

    This assumes that the UndoCommands provided this function respresent
    a transition from the initial state to the final state

    Note:
        UndoCommands need to implement specialUndo (e.g. just call normal undo.)
    """
    for c in commands:
        c.specialUndo()
    model_object.undoStack().beginMacro(desc)
    for c in commands:
        model_object.undoStack().push(c)
    model_object.undoStack().endMacro()
