def parse_segments(warc_paths)
      segments = Hash.new 0

      warc_paths.split.each do |warc_path|
        segment_name = warc_path.split('/')[3]
        segments[segment_name] += 1 if segment_name.present?
      end

      segments
    end
def parse_segments(warc_paths)
      segments = Hash.new 0

      warc_paths.split.each do |warc_path|
        segment_name = warc_path.split('/')[3]
        segments[segment_name] += 1 if segment_name.present?
      end

      segments
    end
Parses the segment names and file counts from the WARC file paths.