docs: def longest_duration(self) -> Optional[datetime.timedelta]:
          """
          Returns the duration of the longest interval, or None if none.
          """
          if not self.intervals:
              return None
          return max(self.durations())