def graph(pairs, write, fontsize, color_map):
    "Given (from, to) pairs of (root, fn) files, output a dot graph."
    write(prefix % fontsize)
    for (froot, f), (troot, t) in pairs:
        if opts.pythonify_filenames:
            f = normpyfn(f)
            t = normpyfn(t)
        if opts.full_pathnames:
            f = os.path.join(froot, f)
            if troot:
                t = os.path.join(troot, t)
        if troot is None:
            dn = os.path.dirname(f)
            if dn not in color_map:
                color_map[dn] = COLORS[len(COLORS) % len(color_map)]
            write('"%s"  [style=filled, color="%s"];\n' % (f, color_map[dn]))
        else:
            write('"%s" -> "%s";\n' % (f, t))
    write(postfix)
dataset/ETHPy150Open CGATOxford/cgat/dependency_graph/graph.py/graph/swapped operands of `%`