def get_graphviz_source(self):
        fh = StringIO()
        fh.write('digraph G {\n')
        fh.write('  graph [ dpi = 300 bgcolor="transparent" rankdir="LR"];\n')
        edges = set()
        for node in sorted(self.nodes.values(), key=lambda x:x.name):
            fh.write(node.name % '  %s [ shape="ellipse" color="blue"];\n')
            for child in node.children:
                edge = (node.name, child.name)
                edges.add(edge)
        for source, target in sorted(edges, key=lambda x:(x[0], x[1])):
            fh.write('  %s -> %s;\n' % (source, target))
        fh.write('}\n')
        return fh.getvalue()
dataset/ETHPy150Open eBay/bayesian-belief-networks/bayesian/gaussian_bayesian_network.py/GaussianBayesianGraph.get_graphviz_source/swapped operands of `%`