code: def testDateTimesNotInOrder(self):
      bars = [
          bar.Bars(
              {
                  "orcl": bar.BasicBar(
                      datetime.datetime(2001, 1, 2),
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      bar.Frequency.DAY,
                  )
              }
          ),
          bar.Bars(
              {
                  "orcl": bar.BasicBar(
                      datetime.datetime(2001, 1, 1),
                      1,
                      1,
                      1,
                      1,
                      1,
                      1,
                      bar.Frequency.DAY,
                  )
              }
          ),
      ]
      f = barfeed.OptimizerBarFeed(bar.Frequency.DAY, ["orcl"], bars)
      with self.assertRaisesRegexp(
          Exception, "Bar date times are not in order.*"
      ):
          for dt, b in f:
              pass
  
file_path: pyalgotrade/testcases/barfeed_test.py
imports: import datetime
  from .None import common
  from pyalgotrade import barfeed
  from pyalgotrade.barfeed import common
  from pyalgotrade import bar
  from pyalgotrade import dispatcher
label_desc: Use image node_id 1 for calling the OptimizerBarFeedTestCase obj's underlying member method code with example usage: obj.testDateTimesNotInOrder() without return types