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: contract_stat.rb
    path of file: ./repos/cryptoexchange/lib/cryptoexchange/exchanges/bitfinex_futures/services
    
    the code of the file until where you have to start completion: module Cryptoexchange::Exchanges
  module BitfinexFutures
    module Services
      class ContractStat < Cryptoexchange::Services::Market
        class << self
          def supports_individua
    
        def adapt(output, market_pair)
          output = output.first
          contract_stat = Cryptoexchange::Models::ContractStat.new

          contract_stat.base      = market_pair.base
          contract_stat.target    = market_pair.target
          contract_stat.market    = BitfinexFutures::Market::NAME
          contract_stat.open_interest = output[18].to_f
          contract_stat.index     = output[15].to_f
          contract_stat.index_identifier = nil
          contract_stat.index_name = nil
          contract_stat.payload   = output

          expire_timestamp = nil
          start_timestamp = nil

          contract_stat.expire_timestamp = expire_timestamp
          contract_stat.start_timestamp = start_timestamp
          contract_stat.contract_type = "perpetual"

          contract_stat.funding_rate_percentage = output[12].to_f * 100
          contract_stat.next_funding_rate_timestamp = output[8]/1000
          contract_stat.funding_rate_percentage_predicted = output[9].to_f * 100

          contract_stat
        end