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: sign_in_as_helper.rb
    path of file: ./repos/action_auth/test/support
    
    the code of the file until where you have to start completion: module SignInAsHelper
  def sign_in_as(user)
    session = user.action_auth_sessions.create
    signed_cookies = ActionDispatch::Request.new(Rails.application.env_config
    
  def sign_in_as(user)
    session = user.action_auth_sessions.create
    signed_cookies = ActionDispatch::Request.new(Rails.application.env_config.deep_dup).cookie_jar
    signed_cookies.signed[:session_token] = { value: session.id, httponly: true }
    cookies[:session_token] = signed_cookies[:session_token]
    session
  end