code: def testSetSharesForUnusedInstrument(self):
      barFeed = yahoofeed.Feed()
      barFeed.addBarsFromCSV(
          AnalyzerTestCase.TestInstrument,
          common.get_data_file_path("orcl-2001-yahoofinance.csv"),
      )
  
      initialCash = 1000
      strat = test_strategy.BacktestingStrategy(barFeed, initialCash)
  
      unkSharesSet = 10
      unkSharePrice = 10.4
      strat.getBroker().setShares("UNK", unkSharesSet, unkSharePrice)
  
      # 33.06
      strat.scheduleCall(
          datetime.datetime(2001, 1, 12),
          lambda: strat.marketOrder(AnalyzerTestCase.TestInstrument, 1),
      )
      # 14.32
      strat.scheduleCall(
          datetime.datetime(2001, 11, 27),
          lambda: strat.marketOrder(
              AnalyzerTestCase.TestInstrument, -1
          ),
      )
  
      stratAnalyzer = returns.Returns()
      strat.attachAnalyzer(stratAnalyzer)
      initialEquity = strat.getBroker().getEquity()
      strat.run()
      finalEquity = strat.getBroker().getEquity()
  
      # The unknown instrument should have no impact cash or returns.
      finalCash = strat.getBroker().getCash()
      self.assertEqual(
          round(finalCash, 2), round(initialCash + (14.32 - 33.06), 2)
      )
      self.assertEqual(
          round(stratAnalyzer.getCumulativeReturns()[-1], 4),
          round((finalEquity - initialEquity) / initialEquity, 4),
      )
      self.assertEqual(stratAnalyzer.getReturns()[-1], 0)
      self.assertEqual(
          strat.getBroker().getShares(AnalyzerTestCase.TestInstrument),
          0,
      )
      self.assertEqual(strat.getBroker().getShares("UNK"), unkSharesSet)
      self.assertEqual(
          strat.getBroker().getEquity(),
          finalCash + unkSharesSet * unkSharePrice,
      )
  
imports: import datetime
  from .None import common
  from .None import strategy_test
  from .None import position_test
  from testcases import test_strategy
  from pyalgotrade.barfeed import yahoofeed
  from pyalgotrade.barfeed import csvfeed
  from pyalgotrade.stratanalyzer import returns
  from pyalgotrade import broker
  from pyalgotrade import marketsession
label_desc: Use image node_id 10 for calling the AnalyzerTestCase obj's underlying member method code with example usage: obj.testSetSharesForUnusedInstrument() without return types