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: build_runner_session.rb
    path of file: ./repos/gitlabhq/app/models/ci
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Ci
  # The purpose of this class is to store Build related runner session.
  # Data
    
    def service_specification(service: nil, path: nil, port: nil, subprotocols: nil)
      return {} unless url.present?

      port = port.presence || DEFAULT_PORT_NAME
      service = service.presence || DEFAULT_SERVICE_NAME
      parsed_url = URI.parse(Addressable::URI.escape(url))
      parsed_url.path += "/proxy/#{service}/#{port}/#{path}"
      subprotocols = subprotocols.presence || ::Ci::BuildRunnerSession::TERMINAL_SUBPROTOCOL

      channel_specification(parsed_url, subprotocols)
    end