'Return True if the given edge overlaps with any edge on the given
level.  This is used by _add_edge to figure out what level a
new edge should be added to.'

def _edge_conflict(self, edge, lvl):

    (s1, e1) = edge.span()
    for otheredge in self._edgelevels[lvl]:
        (s2, e2) = otheredge.span()
        if ((s1 <= s2 < e1) or (s2 <= s1 < e2) or (s1 == s2 == e1 == e2)):
            return True
    return False
