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: pipeline_loader.rb
    path of file: ./repos/sequencescape/lib/record_loader
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# This file was automatically generated via `rails g record_loader`

# RecordLoader handles automatic population and updating of database records
# across different environments
# @see https://rubydoc.info/github/sanger/record_loader/
module RecordLoader
  # Creates the specified pipelines if they are not present.
  # They require a list of request_type_keys to be present
  class PipelineLoader < ApplicationRecordLoader
    config_folder 'pipelines'

    def workflow(options)
      raise 'Workflow not defined' unless options
    
    def add_loading_event(workflow)
      SetDescriptorsTask
        .create_with(name: 'Loading', sorted: 1, lab_activity: true, workflow: workflow)
        .find_or_create_by!(pipeline_workflow_id: workflow.pipeline_id) do |task|
          task.descriptors.build(
            [
              { kind: 'Text', sorter: 4, name: 'Pre-Load Buffer lot #' },
              { kind: 'Text', sorter: 5, name: 'Pre-Load Buffer RGT #' },
              { kind: 'Text', sorter: 6, name: 'Pipette Carousel' },
              { kind: 'Text', sorter: 7, name: 'PhiX lot #' },
              { kind: 'Text', sorter: 8, name: 'PhiX %' },
              { kind: 'Text', sorter: 9, name: 'Lane loading concentration (pM)' },
              { kind: 'Text', sorter: 10, name: 'iPCR batch #' },
              { kind: 'Text', sorter: 11, name: 'Comment' }
            ]
          )
        end
    end