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: version.rb
    path of file: ./repos/metasploit-framework/lib/msf/core/exploit/remote/http/splunk
    
    the code of the file until where you have to start completion: # -*- coding: binary -*-

# Module to get version of splunk app
module Msf::Exploit::Remote::HTTP::Splunk::Versi
    
  def splunk_version_authenticated(cookie_string)
    res = send_request_cgi({
      'uri' => splunk_user_page,
      'vars_get' => {
        'output_mode' => 'json'
      },
      'headers' => {
        'Cookie' => cookie_string
      }
    })

    return nil unless res&.code == 200

    body = res.get_json_document
    body.dig('generator', 'version')
  end