@staticmethod
def _intersection(i1, i2):
    """Compute the intersection of two slices."""
    if i1.intersect(i2):
        return max((i1._start, i2._start)), min((i1._stop, i2._stop))
    else:
        return None, None
