Create a graphviz .dot representation of the automaton.

def make_dot(self, filename_or_stream, auts):
        """Create a graphviz .dot representation of the automaton."""
        if isinstance(filename_or_stream, str):
            stream = file(filename_or_stream, 'w')
        else:
            stream = filename_or_stream
        
        dot = DotFile(stream)
        
        for aut in auts:
            dot.start(aut.name)
            dot.node('shape=Mrecord width=1.5')
    
            for st in aut.states:
                label = st.name
                if st.entering:
                    label += '|%s' % '\\l'.join(str(st) for st in st.entering)
                if st.leaving:
                    label += '|%s' % '\\l'.join(str(st) for st in st.leaving)
                label = '{%s}' % label
                    
                dot.state(st.name, label=label)
                
            for st in aut.states:
                for tr in st.transitions:
                    dot.transition(tr.s_from.name, tr.s_to.name, tr.when)
            
            dot.end()
            
        dot.finish()