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: pry_instance.rb
    path of file: ./repos/pry/lib/pry
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'method_source'
require 'ostruct'

##
# Pry is a powerful alternative to the standard IRB sh
    
  def select_prompt
    object = current_binding.eval('self')
    open_token = @indent.open_delimiters.last || @indent.stack.last

    c = OpenStruct.new(
      object: object,
      nesting_level: binding_stack.size - 1,
      open_token: open_token,
      session_line: Pry.history.session_line_count + 1,
      history_line: Pry.history.history_line_count + 1,
      expr_number: input_ring.count,
      pry_instance: self,
      binding_stack: binding_stack,
      input_ring: input_ring,
      eval_string: @eval_string,
      cont: !@eval_string.empty?
    )

    Pry.critical_section do
      # If input buffer is empty, then use normal prompt. Otherwise use the wait
      # prompt (indicating multi-line expression).
      if prompt.is_a?(Pry::Prompt)
        prompt_proc = eval_string.empty? ? prompt.wait_proc : prompt.incomplete_proc
        return prompt_proc.call(c.object, c.nesting_level, c.pry_instance)
      end

      unless @prompt_warn
        @prompt_warn = true
        Kernel.warn(
          "warning: setting prompt with help of " \
          "`Pry.config.prompt = [proc {}, proc {}]` is deprecated. " \
          "Use Pry::Prompt API instead"
        )
      end