def METHOD_NAME(outpath, inpaths):
    first, rest = inpaths[0], inpaths[1:]
    for x in range(1):
        try:
            stats = pstats.Stats(first)
        except EOFError:
            time.sleep(0.2)
            continue
        print("Writing %r..." % (outpath,))
        for path in rest:
            #print("Merging %r into %r.." % (os.path.basename(path), outpath))
            for x in range(5):
                if try_merge(stats, path):
                    break
                time.sleep(0.2)
    pstats.dump_stats(outpath)