code: def onBars(self, dateTime, bars):
      self.__count += 1
  
      if self.__fromDate is not None:
          self.__testcase.assertTrue(
              bars.getBar(self.__instrument).getDateTime()
              >= self.__fromDate
          )
      if self.__toDate is not None:
          self.__testcase.assertTrue(
              bars.getBar(self.__instrument).getDateTime()
              <= self.__toDate
          )
  
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_TestFilterRange obj's underlying member method code with example usage: obj.onBars(dateTime, bars) without return types