input: def count_overlapping_occurrences(text: str, segment: str) -> int:
      """ Count the number of overlapping occurrences of a specified segment within the given text.
      >>> count_overlapping_occurrences('', 'a')
      0
      >>> count_overlapping_occurrences('aaa', 'a')
      3
      >>> count_overlapping_occurrences('aaaa', 'aa')
      3
      """
output:     count = start = 0
      while True:
          start = text.find(segment, start)
          if start == -1:
              break
          count += 1
          start += 1
      return count