docs: def longest_interval(self) -> Optional[Interval]:
          """
          Returns the longest interval, or ``None`` if none.
          """
          longest_duration = self.longest_duration()
          for i in self.intervals:
              if i.duration() == longest_duration:
                  return i
          return None