def clear(self): #XXX should this clear self.reverse also?
        """Removes all tails from self and all references to self._id in tail.reverse

        >>> class myvertex(ReverseEdgeMixin, Vertex):
        ...    pass
        >>> g = Graph({1: {1: 1, 2: 4, 3: 9}, 2: {3: 8}}, myvertex)
        >>> g[1].clear()
        >>> g[1].reverse, g[2].reverse, g[3].reverse
        ({}, {}, {2: True})
        """
        g, vid = self._graph, self._id
        for tail in self:
            del g[tail].reverse[vid]
        super(ReverseEdgeMixin, self).clear()
Removes all tails from self and all references to self._id in tail.reverse

        >>> class myvertex(ReverseEdgeMixin, Vertex):
        ...    pass
        >>> g = Graph({1: {1: 1, 2: 4, 3: 9}, 2: {3: 8}}, myvertex)
        >>> g[1].clear()
        >>> g[1].reverse, g[2].reverse, g[3].reverse
        ({}, {}, {2: True})
        
recipes/Python/578615_graph/recipe-578615.py