code: def __get_segments_from_cycle(graph, cycle_path):
      
      list_of_segments = []
      # We work through the cycle in a bottom-up fashion
      for n in cycle_path[::-1]:
          segments = __get_segments_from_node(n, graph)
          if segments:
              list_of_segments.append(segments)
  
      return list_of_segments
docs: Calculates the segments that emanate from the main cycle.