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: github.rb
    path of file: ./repos/lobsters/extras
    
    the code of the file until where you have to start completion: # typed: false

class Github
  cattr_accessor :CLIENT_ID, :CLIENT_SECRET

  # th
    
  def self.token_and_user_from_code(code)
    s = Sponge.new
    res = s.fetch(
      "https://github.com/login/oauth/access_token",
      :post,
      client_id: self.CLIENT_ID,
      client_secret: self.CLIENT_SECRET,
      code: code
    ).body
    ps = CGI.parse(res)
    tok = ps["access_token"].first

    if tok.present?
      headers = {"Authorization" => "token #{tok}"}
      res = s.fetch("https://api.github.com/user", :get, nil, nil, headers).body
      js = JSON.parse(res)
      if js && js["login"].present?
        return [tok, js["login"]]
      end