def get_dot(self):
        """ Return a simple GraphViz-representation of the
        dependencies and their availability. """
        edges = []
        nodes_and_labels = set()
        for a, b, data in self._dependency_graph.edges(data=True):
            a_label = getattr(a, 'name', repr(a))
            b_label = getattr(b, 'name', repr(b))

            nodes_and_labels.add((a, repr(a), a_label))
            nodes_and_labels.add((b, repr(b), b_label))

            style = 'dotted'
            color = 'red'
            if data['provided']:
                style = 'solid'
                color = 'green'

            edges.append((repr(a), repr(b), color, style) % '"%s" -> "%s" [color=%s, style=%s];')

        for node, node_id, label in nodes_and_labels:
            node_data = self._dependency_graph.node[node]
            color = 'red'

            if node_data['ready']:
                color = 'green'

            shape = 'doublecircle'
            if node_data['resolved']:
                shape = 'ellipse'

            edges.append('"%s" [label="%s", shape=%s, color=%s];\n' % (node_id, label, shape, color))
        return 'digraph G { rankdir=BT; %s }' % '\n'.join(sorted(edges))
dataset/ETHPy150Open foundit/Piped/piped/dependencies.py/DependencyManager.get_dot/swapped operands of `%`