code: def slice(self, start, end):
          
          start, end, mask = \
              self._check_boundaries(start, end, allow_infinite=True)
  
          result = TimeSeries(default=self.default)
          for t0, t1, value in self.iterperiods(start, end):
              result[t0] = value
  
          result[t1] = self[t1]
  
          return result
docs: Return an equivalent TimeSeries that only has points between
          `start` and `end` (always starting at `start`)