docstr: Test that when a double volume switch occurs we treat the first switch
  as the roll, assuming it is within a certain distance of the next auto
  close date. See `VolumeRollFinder._active_contract` for a full
  explanation and example.
docstr_tok: ["Test","that","when","a","double","volume","switch","occurs","we","treat","the","first","switch","as","the","roll",",","assuming","it","is","within","a","certain","distance","of","the","next","auto","close","date",".","See","`","VolumeRollFinder._active_contract","`","for","a","full","explanation","and","example","."]
code: def _test_double_volume_switch(self):
      """
      Test that when a double volume switch occurs we treat the first switch
      as the roll, assuming it is within a certain distance of the next auto
      close date. See `VolumeRollFinder._active_contract` for a full
      explanation and example.
      """
      cf = self.asset_finder.create_continuous_future(
          "DF",
          0,
          "volume",
          None,
      )
  
      sessions = self.trading_calendar.sessions_in_range(
          "2016-02-09",
          "2016-02-17",
      )
      for session in sessions:
          bar_data = self.create_bardata(lambda: session)
          contract = bar_data.current(cf, "contract")
  
          # The 'G' contract surpasses the 'F' contract in volume on
          # 2016-02-10, which means that the 'G' contract should become the
          # front contract starting on 2016-02-11.
          if session < pd.Timestamp("2016-02-11", tz="UTC"):
              self.assertEqual(contract.symbol, "DFF16")
          else:
              self.assertEqual(contract.symbol, "DFG16")
  
imports: from collections import deque
  from functools import partial
  from textwrap import dedent
  from numpy import arange, array, int64, full, repeat, tile
  from numpy.testing import assert_almost_equal
  import pandas
  from pandas import Timestamp, DataFrame
  from catalyst import TradingAlgorithm
  from catalyst.assets.continuous_futures import OrderedContracts, delivery_predicate
  from catalyst.data.minute_bars import FUTURES_MINUTES_PER_DAY
  from catalyst.errors import SymbolNotFound
  from catalyst.testing.fixtures import WithAssetFinder, WithCreateBarData, WithDataPortal, WithBcolzFutureMinuteBarReader, WithSimParams, CatalystTestCase
label_desc: Use image node_id 4 for calling the ContinuousFuturesTestCase obj's underlying member method code with example usage: obj._test_double_volume_switch() without return types