def to_string(self):
        """Returns a string representation of the node in dot language.
        """
        
        
        # RMF: special case defaults for node, edge and graph properties.
        #
        node = quote_if_necessary(self.obj_dict['name'])

        node_attr = list()

        for attr, value in self.obj_dict['attributes'].iteritems():
            if value is not None:
                node_attr.append( '%s=%s' % (attr, quote_if_necessary(value) ) )
            else:
                node_attr.append( attr )
                
                
        # No point in having nodes setting any defaults if the don't set
        # any attributes...
        #
        if node in ('graph', 'node', 'edge') and len(node_attr) == 0:
            return ''
            
        node_attr = ', '.join(node_attr)

        if node_attr:
            node += ' [' + node_attr + ']'

        return node + ';'
dataset/ETHPy150Open erocarrera/pydot/pydot.py/Node.to_string/original