code: def testFirstBar(self):
      initialCash = 1000
      barFeed = yahoofeed.Feed()
      barFeed.addBarsFromCSV(
          AnalyzerTestCase.TestInstrument,
          common.get_data_file_path("orcl-2001-yahoofinance.csv"),
      )
      strat = strategy_test.TestStrategy(barFeed, initialCash)
  
      strat.addOrder(
          datetime.datetime(2001, 1, 2),
          strat.getBroker().createMarketOrder,
          broker.Order.Action.BUY,
          AnalyzerTestCase.TestInstrument,
          1,
          False,
      )  # 2001-01-03 Open: 25.25 Close: 32.00
  
      stratAnalyzer = returns.Returns()
      strat.attachAnalyzer(stratAnalyzer)
      strat.run()
      self.assertEqual(stratAnalyzer.getReturns()[0], 0)
      self.assertEqual(
          stratAnalyzer.getReturns()[1], (32.00 - 25.25) / 1000
      )
  
      # Check date times.
      datetimes = barFeed[
          AnalyzerTestCase.TestInstrument
      ].getDateTimes()
      for i in [0, -1]:
          self.assertEqual(
              stratAnalyzer.getReturns().getDateTimes()[i], datetimes[i]
          )
          self.assertEqual(
              stratAnalyzer.getCumulativeReturns().getDateTimes()[i],
              datetimes[i],
          )
  
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 9 for calling the AnalyzerTestCase obj's underlying member method code with example usage: obj.testFirstBar() without return types