def writeStackTraceSummary(stackLog):
    '''
    Collapse duplicate stack traces...
    '''
    traceDict = {}
    for id, traceList in StackInfo.getTraces().iteritems():
        trace = ''.join(traceList)
        if traceDict not in trace:
            traceDict[trace] = []
        traceDict[trace].append(id)

    for trace, idList in traceDict.iteritems():
        for id in idList:
            stackLog.write(str(id) + '\n')
        stackLog.write("".join(trace))
        stackLog.write('-----------------------------------------------------------------\n')
dataset/ETHPy150Open ufora/ufora/ufora/util/StackTraceLoop.py/writeStackTraceSummary/swapped operands of `not in`