code: def test_adjust_returns_for_slippage(self):
      dates = date_range(start="2015-01-01", freq="D", periods=20)
  
      positions = DataFrame(
          [[0.0, 10.0]] * len(dates), columns=[0, "cash"], index=dates
      )
  
      # 100% total, 50% average daily turnover
      transactions = DataFrame(
          data=[[1, 1, 10, "A"]] * len(dates),
          columns=["sid", "amount", "price", "symbol"],
          index=dates,
      )
  
      returns = Series([0.05] * len(dates), index=dates)
      # 0.001% slippage per dollar traded
      slippage_bps = 10
      expected = Series([0.049] * len(dates), index=dates)
  
      result = adjust_returns_for_slippage(
          returns, positions, transactions, slippage_bps
      )
  
      assert_series_equal(result, expected)
  
imports: from unittest import TestCase
  from pandas import Series, DataFrame, date_range
  from pandas.util.testing import assert_series_equal
  from pyfolio.txn import get_turnover, adjust_returns_for_slippage
label_desc: Use image node_id 2 for calling the TransactionsTestCase obj's underlying member method code with example usage: obj.test_adjust_returns_for_slippage() without return types