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_steps.rb
    path of file: ./repos/sequencescape/features/support/step_definitions
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

Given /^I have a pipeline called "([^"]*)"$/ do |name|
  requ
    
def create_request_for_pipeline(pipeline_name, options = {}) # rubocop:todo Metrics/AbcSize
  pipeline = Pipeline.find_by(name: pipeline_name) or
    raise StandardError, "Cannot find pipeline #{pipeline_name.inspect}"

  request_metadata = FactoryBot.create :"request_metadata_for_#{pipeline.request_types.first.key}"
  request_parameters =
    options.merge(
      request_type: pipeline.request_types.last,
      asset: FactoryBot.create(pipeline_name_to_asset_type(pipeline_name)),
      request_metadata: request_metadata
    )
  FactoryBot
    .create(:request_with_submission, request_parameters)
    .tap { |request| request.asset.labware.create_scanned_into_lab_event!(content: '2018-01-01') }
end