code: def test_get_max_days_to_liquidate_by_ticker(self):
      mdtl = get_max_days_to_liquidate_by_ticker(
          self.positions,
          self.market_data,
          max_bar_consumption=1,
          capital_base=1e6,
          mean_volume_window=1,
      )
  
      expected = DataFrame(
          [
              [datetime(2015, 1, 3), 0.75 / 2, 75.0],
              [datetime(2015, 1, 2), 0.5 / 3, 50.0],
          ],
          columns=["date", "days_to_liquidate", "pos_alloc_pct"],
          index=["A", "B"],
      )
      expected.index.name = "symbol"
  
      assert_frame_equal(mdtl, expected)
  
file_path: pyfolio/pyfolio/tests/test_capacity.py
imports: from __future__ import division
  from unittest import TestCase
  from nose_parameterized import parameterized
  from pandas import Series, DataFrame, date_range, datetime, concat
  from pandas.util.testing import assert_frame_equal, assert_series_equal
  from pyfolio.capacity import days_to_liquidate_positions, get_max_days_to_liquidate_by_ticker, get_low_liquidity_transactions, daily_txns_with_bar_data, apply_slippage_penalty
label_desc: Use image node_id 2 for calling the CapacityTestCase obj's underlying member method code with example usage: obj.test_get_max_days_to_liquidate_by_ticker() without return types