code: def write_branch_data(self, file, padding="    "):
          
          attrs = ['%s="%s"' % (k,v) for k,v in self.branch_attr.iteritems()]
          attr_str = ", ".join(attrs)
  
          for br in self.case.branches:
              file.write("%s%s -> %s [%s];\n" % \
                  (padding, br.from_bus.name, br.to_bus.name, attr_str))
docs: Writes branch data in Graphviz DOT language.