(self)
return ret
Output for graphviz (.dot) files
        :rtype: str
Output for graphviz (.dot) files
        :rtype: str
Output for graphviz ( . dot ) files : rtype : str
def to_dot(self):
        """
        Output for graphviz (.dot) files
        :rtype: str
        """
        attributes = {
            'label': self.label(),
            'name': self.name(),
            'shape': "rect",
            'style': 'rounded,filled',
            'fillcolor': NODE_COLOR,
        }
        if self.is_trunk:
            attributes['fillcolor'] = TRUNK_COLOR
        elif self.is_leaf:
            attributes['fillcolor'] = LEAF_COLOR

        ret = self.uid + ' ['
        for k, v in attributes.items():
            ret += f'{k}="{v}" '
        ret += ']'
        return ret
def to_dot ( self ) : attributes = { 'label' : self . label ( ) , 'name' : self . name ( ) , 'shape' : "rect" , 'style' : 'rounded,filled' , 'fillcolor' : NODE_COLOR , } if self . is_trunk : attributes [ 'fillcolor' ] = TRUNK_COLOR elif self . is_leaf : attributes [ 'fillcolor' ] = LEAF_COLOR ret = self . uid + ' [' for k , v in attributes . items ( ) : ret += f'{k}="{v}" ' ret += ']' return ret