code: def testNonEmpty(self):
      ds = dataseries.SequenceDataSeries()
      for value in xrange(10):
          ds.append(value)
      self.assertTrue(len(ds) == 10)
      self.assertTrue(ds[-1] == 9)
      self.assertTrue(ds[-2] == 8)
      self.assertTrue(ds[0] == 0)
      self.assertTrue(ds[1] == 1)
  
      self.assertTrue(ds[-1:] == [9])
      self.assertTrue(ds[-2:] == [8, 9])
      self.assertTrue(ds[-2:-1] == [8])
      self.assertTrue(ds[-3:-1] == [7, 8])
  
      self.assertTrue(ds[1:4] == [1, 2, 3])
      self.assertTrue(ds[9:10] == [9])
      self.assertTrue(ds[9:11] == [9])
      self.assertTrue(ds[9:] == [9])
  
imports: import datetime
  from six.moves import xrange
  from .None import common
  from pyalgotrade import dataseries
  from pyalgotrade.dataseries import bards
  from pyalgotrade.dataseries import aligned
  from pyalgotrade import bar
label_desc: Use image node_id 2 for calling the TestSequenceDataSeries obj's underlying member method code with example usage: obj.testNonEmpty() without return types