def _offsets_equal(o1, o2):
    """
    Given two lists of (start, end) integer offset sets, returns
    whether they identify the same sets of characters.
    """
    if o1 == o2:
        return True
    return sorted(o1) == sorted(o2)
