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: output_helpers.rb
    path of file: ./repos/pakyow/spec/helpers
    
    the code of the file until where you have to start completion: module OutputHelpers
  def capture_output(cap
    
  def capture_output(capture = StringIO.new)
    original_stdout = $stdout
    original_stderr = $stderr
    $stdout = capture
    $stderr = capture
    yield
    $stdout.string
  ensure
    $stdout = original_stdout
    $stderr = original_stderr
  end