'Create a new edge in the data structure
@name: Name of the edge, that will be the graphviz label
@parent: The edge parent id
@distinct: if true, will not create and edge that has the same name
Returns: The edge id created'

def __edge_new(self, name, parent=None, distinct=None):

    if distinct:
        if self.__edges:
            for e in self.__edges:
                props = e['properties']
                if (props['label'] == name):
                    return (-1)
    self.__id += 1
    edge = {'id': self.__id, 'lock': 0, 'parent': parent, 'to': [], 'style': None, 'properties': {'label': name}}
    self.__edges.append(edge)
    return self.__id
