class_docstr: The VolumeRollFinder calculates contract rolls based on when
  volume activity transfers from one contract to another.
class_docstr_tok: ["The","VolumeRollFinder","calculates","contract","rolls","based","on","when","volume","activity","transfers","from","one","contract","to","another","."]
docstr: Parameters
  ----------
  root_symbol : str
      The root symbol for the contract chain.
  dt : Timestamp
      The datetime for which to retrieve the current contract.
  offset : int
      The offset from the primary contract.
      0 is the primary, 1 is the secondary, etc.
  
  Returns
  -------
  Future
      The active future contract at the given dt.
docstr_tok: ["Parameters","--","--","--","--","--","root_symbol",":","str","The","root","symbol","for","the","contract","chain",".","dt",":","Timestamp","The","datetime","for","which","to","retrieve","the","current","contract",".","offset",":","int","The","offset","from","the","primary","contract",".","0","is","the","primary",",","1","is","the","secondary",",","etc",".","Returns","--","--","--","-","Future","The","active","future","contract","at","the","given","dt","."]
code: def get_contract_center(self, root_symbol, dt, offset):
      """
      Parameters
      ----------
      root_symbol : str
          The root symbol for the contract chain.
      dt : Timestamp
          The datetime for which to retrieve the current contract.
      offset : int
          The offset from the primary contract.
          0 is the primary, 1 is the secondary, etc.
  
      Returns
      -------
      Future
          The active future contract at the given dt.
      """
      # When determining the center contract on a specific day using volume
      # rolls, simply picking the contract with the highest volume could
      # cause flip-flopping between active contracts each day if the front
      # and back contracts are close in volume. Therefore, information about
      # the surrounding rolls is required. The `get_rolls` logic prevents
      # contracts from being considered active once they have rolled, so
      # incorporating that logic here prevents flip-flopping.
      day = self.trading_calendar.day
      end_date = min(
          dt + (ROLL_DAYS_FOR_CURRENT_CONTRACT * day),
          self.session_reader.last_available_dt,
      )
      rolls = self.get_rolls(
          root_symbol=root_symbol,
          start=dt,
          end=end_date,
          offset=offset,
      )
      sid, acd = rolls[0]
      return self.asset_finder.retrieve_asset(sid)
  
file_path: zipline/zipline/assets/roll_finder.py
imports: from abc import ABCMeta, abstractmethod
  from six import with_metaclass
label_desc: Use image node_id 3 for calling the VolumeRollFinder obj's underlying member method code with example usage: obj.get_contract_center(root_symbol, dt, offset) and returns: self