def _subtract(start, stop, intervals):
    """
    Subtract intervals from a spanning interval.
    
    """
    remainder_start = start
    sub_stop = None
    for sub_start, sub_stop in _collapse(intervals):
        if remainder_start < sub_start:
            yield _Interval(remainder_start, sub_start)
        remainder_start = sub_stop
    if sub_stop is not None and stop < sub_stop:
        yield _Interval(sub_stop, stop)
dataset/ETHPy150Open alimanfoo/petl/petl/transform/intervals.py/_subtract/swapped operands of `<`