def METHOD_NAME(data, modes=['wallclock', 'segment'], path="./"):
    """
        alternative mode: wallclock
    """
    #print(data)
    fileid = data['cur']['fileid']
    rankid = data['rankid']
    trace = data['cur']['ranks'][ data['rankid'] ]['trace']
    minsize = data['minsize']
    start = data['cur']['ranks'][ data['rankid'] ]['start']
    end = data['cur']['ranks'][ data['rankid'] ]['end']
    duration = (end-start)
    filename = "%s/%s" % (path, fileid)
    #filename = "%s/file%s_rank%s" % (path, fileid, rankid)
    filename = os.path.normpath(filename)
    if 'wallclock' in modes:
        img = wallclock(trace, minsize, duration, start, end)
        print('Writing %s_wallclock.png' % (filename))
        img.save('%s_wallclock.png' % (filename), 'PNG')
    if 'segment' in modes:
        img = segment(trace, minsize, duration)
        print('Writing %s_segment.png' % (filename))
        img.save('%s_segment.png' % (filename), 'PNG')