code: def offset(self, offset, allow_negative=False, min_begin_value=None, max_end_value=None):
          
          if not isinstance(offset, TimeValue):
              raise TypeError(u"offset is not an instance of TimeValue")
          self.begin += offset
          self.end += offset
          if not allow_negative:
              self.begin = max(self.begin, TimeValue("0.000"))
              self.end = max(self.end, TimeValue("0.000"))
          if (min_begin_value is not None) and (max_end_value is not None):
              self.begin = min(max(self.begin, min_begin_value), max_end_value)
              self.end = min(self.end, max_end_value)
          return self
docs: Move this interval by the given shift ``offset``.
  
          The begin and end time points of the translated interval
          are ensured to be non-negative
          (i.e., they are maxed with ``0.000``),
          unless ``allow_negative`` is set to ``True``.
  
          :param offset: the shift to be applied
          :type  offset: :class:`~aeneas.exacttiming.TimeValue`
          :param allow_negative: if ``True``, allow the translated interval to have negative extrema
          :type  allow_negative: bool
          :param min_begin_value: if not ``None``, specify the minimum value for the begin of the translated interval
          :type  min_begin_value: :class:`~aeneas.exacttiming.TimeValue`
          :param max_begin_value: if not ``None``, specify the maximum value for the end of the translated interval
          :type  max_begin_value: :class:`~aeneas.exacttiming.TimeValue`
          :raises TypeError: if ``offset`` is not an instance of ``TimeValue``
          :rtype: :class:`~aeneas.exacttiming.TimeInterval`