code: def testBlackWhiteReversal(self):
      bds = bards.BarDataSeries()
      lb = linebreak.LineBreak(bds, 2)
      bds.append(
          bar.BasicBar(
              datetime.datetime(2008, 3, 5),
              10,
              12,
              8,
              9,
              1,
              None,
              bar.Frequency.DAY,
          )
      )
      self.assertEqual(len(lb), 1)
      bds.append(
          bar.BasicBar(
              datetime.datetime(2008, 3, 6),
              9,
              12,
              9,
              12,
              1,
              None,
              bar.Frequency.DAY,
          )
      )
      self.assertEqual(len(lb), 1)
      self.assertEqual(lb[-1].isBlack(), True)
      self.assertEqual(
          lb[-1].getDateTime(), datetime.datetime(2008, 3, 5)
      )
  
      bds.append(
          bar.BasicBar(
              datetime.datetime(2008, 3, 7),
              9,
              13,
              5,
              13,
              1,
              None,
              bar.Frequency.DAY,
          )
      )
      self.assertEqual(len(lb), 2)
      self.assertEqual(lb[-1].isWhite(), True)
      self.assertEqual(
          lb[-1].getDateTime(), datetime.datetime(2008, 3, 7)
      )
  
file_path: pyalgotrade/testcases/technical_linebreak_test.py
imports: import datetime
  from .None import common
  from pyalgotrade.technical import linebreak
  from pyalgotrade.barfeed import yahoofeed
  from pyalgotrade import dataseries
  from pyalgotrade import bar
  from pyalgotrade.dataseries import bards
label_desc: Use image node_id 9 for calling the LineBreakTestCase obj's underlying member method code with example usage: obj.testBlackWhiteReversal() without return types