def run_save(
    tg,
    minimumIntervalLength=None,
    minTimestamp=None,
    maxTimestamp=None,
    ignoreBlankSpaces=False,
):
    """
    Mock write function and return the first tier's entry list

    tg.save() mutates the textgrid's data, so the entry list
    before and after saving can be different
    """

    tg.save(
        "garbage.Textgrid",
        minimumIntervalLength=minimumIntervalLength,
        minTimestamp=minTimestamp,
        maxTimestamp=maxTimestamp,
        ignoreBlankSpaces=ignoreBlankSpaces,
    )

    entryList = tg.tierDict[tg.tierNameList[0]].entryList
    entryList = [[start, end, label] for start, end, label in entryList]

    return entryList