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.rb
    path of file: ./repos/sequencescape/app/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
# A Pipeline acts to associate {Request requests} with a {Workflow}.
# Visiting a pipeline's page will display an inbox of pending {Batch unbatched}
# requests, and a summary list of ongoing {Batch batches} for that particular
# pipeline. The users are able to generate new batches from the available requests
# and to from there progress a {Batch} through the associated workflow.
# @note Generally speaking we are trying to migrate pipelines out of the Sequencescape
#       core.
class Pipeline < ApplicationRecord # rubocop:todo Metrics/ClassLength
  include Uuid::Uuidable
  include Pipeline::BatchValidation
  include SharedBehaviour::Named

  # Rails class attributes
  self.inheritance_column = 'sti_type'

  # Custom class attributes
  class_attribute :batch_worksheet,
                  :requ
    
  def post_finish_batch(batch, user); end

  def completed_request_as_part_of_release_batch(request)
    EventSender.send_request_update(request, 'complete', "Completed pipeline: #{name}")
  end

  def on_start_batch(batch, user)
    # Do nothing
  end

  def post_release_batch(batch, user)
    # Do Nothing
  end

  # Extracts the request ids from the selected requests. Overidden in pipleines
  # which group by parent, as requests are grouped together by eg. submission id and labware id
  # and the individual request ids are unavailable
  def extract_requests_from_input_params(params)
    request_ids = params.fetch('request')
    requests.inputs(true).order(:id).find(selected_keys_from(request_ids))
  end

  def all_requests_from_submissions_selected?(_request_ids)
    true
  end

  def request_actions
    [:fail]
  end

  def robot_verified!(batch)
    # Do nothing!
  end

  def requests_in_inbox(show_held_requests = true)
    apply_includes(
      requests
        .unbatched
        .pipeline_pending(show_held_requests)
        .with_present_asset
        .order(request_sort_order)
        .send(inbox_eager_loading)
    )
  end

  def request_count_in_inbox(show_held_requests)
    requests.unbatched.pipeline_pending(show_held_requests).with_present_asset.count
  end

  def pick_information?(_)
    false
  end

  private

  def apply_includes(scope)
    request_information_types.exists? ? scope.include_request_metadata : scope
  end

  def grouping_parser
    GrouperForPipeline.new(self)
  end

  def selected_keys_from(browser_options)
    browser_options.select { |_, v| v == '1' }.keys
  end
end