code: def transform(self, offset):
          
          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
docs: Shift this range by the specified offset.
  
          Note: the resulting range must be a valid interval.