<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def ask_visualization():
 """ ask user which viz output to use """

    printDebug(
        "Please choose an output format for the ontology visualization: (q=quit)\n",
        "important")
    while True:
        text = ""
        for viz in VISUALIZATIONS_LIST:
            text += "%d) %s\n" % (VISUALIZATIONS_LIST.index(viz) + 1,
                                  viz['Title'])
        var = input(text + ">")
        if var == "q":
            return ""
        else:
            try:
                n = int(var) - 1
                test = VISUALIZATIONS_LIST[
                    n]  # throw exception if number wrong
                return n
            except:
                printDebug("Invalid selection. Please try again.", "red")
                continue