def getTotalTime(segs, countMultipleSpkrs=True):
    """
    This function counts the overall ground truth time after removing the collars.  An option allows overlapping
    speaker time to be double counted or not.

    Inputs:
    - segs: the list of ground truth and diarization segments after removing segments within the collars
    - countMultipleSpeakers: a Boolean option to double count overlapping ground truth speaker time (i.e. all time
                             spoken by ground truth speakers v. time in which ground truth speakers are speaking),
                             default "True"

    Outputs:
    - time: aggregate ground truth speaker time in seconds, form: "408.565" (multiple on) or "400.01" (multiple off)
    """
    time = 0
    for row in segs:
        if countMultipleSpkrs == False:
            time += row['tend'] - row['tbeg']
        else:
            time += (row['tend'] - row['tbeg']) * len(row['name']['oname'])
    #time = round(time, 3)
    return time