Shift this range by the specified offset.

        Note: the resulting range must be a valid interval.

def transform(self, offset):
        """
        Shift this range by the specified offset.

        Note: the resulting range must be a valid interval.
        """
        assert self._start + offset > 0, \
            ('offset {} invalid; resulting range [{}, {}) is '
             'undefined'.format(offset, self._start+offset, self._end+offset))
        self._start += offset
        self._end += offset