code: def test_reference_empty_position_by_int(self):
      with warnings.catch_warnings(record=True) as w:
          warnings.simplefilter("default", ZiplineDeprecationWarning)
  
          algo = self.create_algo(
              reference_missing_position_by_int_algo
          )
          algo.run()
  
          self.assertEqual(1, len(w))
          self.assertEqual(
              str(w[0].message),
              "Referencing positions by integer is deprecated. Use an asset "
              "instead.",
          )
  
imports: import warnings
  from mock import patch
  import numpy
  import pandas
  from pandas.core.common import PerformanceWarning
  from zipline.finance.trading import SimulationParameters
  from zipline.testing import MockDailyBarReader, create_daily_df_for_asset, create_minute_df_for_asset, str_to_seconds
  from zipline.testing.fixtures import WithCreateBarData, WithMakeAlgo, ZiplineTestCase
  from zipline.zipline_warnings import ZiplineDeprecationWarning
label_desc: Use image node_id 15 for calling the TestAPIShim obj's underlying member method code with example usage: obj.test_reference_empty_position_by_int() without return types