code: def onBars(self, dateTime, bars):
      self.__count += 1
      dateTime = bars.getBar(self.__instrument).getDateTime()
      if self.__prevDateTime is not None:
          # Check that bars are loaded in order
          self.__testcase.assertTrue(self.__prevDateTime < dateTime)
          # Check that the last value in the dataseries match the current datetime.
          self.__testcase.assertTrue(
              self.__barFeed.getDataSeries()[-1].getDateTime()
              == dateTime
          )
          # Check that the datetime for the last value matches that last datetime in the dataseries.
          self.__testcase.assertEqual(
              self.__barFeed.getDataSeries()[-1].getDateTime(),
              self.__barFeed.getDataSeries().getDateTimes()[-1],
          )
      self.__prevDateTime = dateTime
  
imports: import datetime
  from .None import common
  from .None import barfeed_test
  from .None import feed_test
  from pyalgotrade.utils import dt
  from pyalgotrade.barfeed import yahoofeed
  from pyalgotrade.barfeed import csvfeed
  from pyalgotrade import bar
  from pyalgotrade import marketsession
label_desc: Use image node_id 2 for calling the BarFeedEventHandler_TestLoadOrder obj's underlying member method code with example usage: obj.onBars(dateTime, bars) without return types