1    def __init__(self, directed=False):
2        '''
3        Create an empty graph (undirected, by default).
4        Graph is directed if optional paramter is set to True.
5        '''
6
7        self._outgoing = {}
8        self._incoming = {} if directed else self._outgoing

