You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rename_descendants_service.rb
    path of file: ./repos/gitlabhq/app/services/routes
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Routes
  class RenameDescendantsService
    BATCH_SIZE = 100
    class RouteChanges
      attr_reader :saved_change_to_parent_path, :saved_change_to_parent_name
    
    def create_redirect_routes_for_descendants
      return if @redirect_routes_to_insert.blank?

      @redirect_routes_to_insert.each_slice(BATCH_SIZE) do |data|
        RedirectRoute.insert_all(
          data,
          # We need to make sure no duplicates are inserted.
          # We use the value of `lower(path)` to make this check,
          # which is already a UNIQUE index on this table.
          unique_by: :index_redirect_routes_on_path_unique_text_pattern_ops
        )
      end
    end