def run(self):
        print "digraph G {"
        print "node [ shape=box, style=filled, color=lightgrey ];"

        dot = Dot(config.load_configs(self.config))
        services = dot.services()
        sessions = dot.sessions()

        def missing(x):
            return self.show_startups and services not in x

        for session in sessions:
            conf = dict(session.conf)
            path = session.path
            src = conf.pop("src_room", None)
            dst = conf.pop("dst_room", None)

            node = None
            if session.service != "roomgraph":
                node = "node " + session.service + " " + (src or "@") + " " + (dst or "@")
                if missing(session.service):
                    print line(node, label=session.service, shape="ellipse", fontsize=12, fontcolor="white", color="red")
                else:
                    print line(node, label=session.service, shape="ellipse", fontsize=12, style="")

            label_list = list()
            if path:
                label_list.append(".".join(path))
            if self.show_attributes:
                for item in conf.items():
                    label_list.append("  %r=%r" % item)
            label = "\\n".join(label_list)

            color = "red" if missing(session.service) else "black"
            if src is None:
                if node is not None and dst is not None:
                    print line(node, dst, label=label, color=color, fontsize=10)
            else:
                if node is not None and dst is None:
                    print line(src, node, label=label, color=color, fontsize=10)
                elif node is None and dst is not None:
                    print line(src, dst, label=label, color=color, fontsize=10)
                elif node is not None and dst is not None:
                    print line(src, node, label="", color=color, fontsize=10)
                    print line(node, dst, label=label, color=color, fontsize=10)

        print '}'
dataset/ETHPy150Open abusesa/abusehelper/abusehelper/tools/runtime2dot/runtime2dot.py/DotBot.run/swapped operands of `not in`