def cut(self, times: Union[datetime.datetime,
                               List[datetime.datetime]]) -> List["Interval"]:
        """
        Returns a list of intervals produced by using times (a list of
        ``datetime.datetime`` objects, or a single such object) as a set of
        knives to slice this interval.
        """
        if not isinstance(times, list):
            # Single time
            time = times
            if not self.contains(time):
                return []
            return [
                Interval(self.start, time),
                Interval(time, self.end)
            ]
        else:
            # Multiple times
            times = [t for t in times if self.contains(t)]  # discard others
            times.sort()
            times = [self.start] + times + [self.end]
            intervals = []
            for i in range(len(times) - 1):
                intervals.append(Interval(times[i], times[i + 1]))
            return intervals
Returns a list of intervals produced by using times (a list of
        ``datetime.datetime`` objects, or a single such object) as a set of
        knives to slice this interval.