def get_topic_data(sheet, tab_name="messages"):
    """ Returns a dictionary of Topic keys with a values containing
        relevent Phrase and Photoprefix k/v pairs for each
    """
    wks = sheet.worksheet(tab_name)
    rowdict = {}
    rowcounter = 2
    while True:
        row = wks.range("A{0}:C{0}".format(rowcounter))
        if row[0].value != '':
            rowdict[row[0].value] = {
                "Phrase": row[1].value,
                "Photoprefix": row[2].value,
                }
            rowcounter += 1
        else:
            break
    return rowdict