code: def testInvalidPosNotCached(self):
      ds = dataseries.SequenceDataSeries()
      testFilter = TestFilter(ds)
      for i in range(10):
          ds.append(i)
          ds.append(None)  # Interleave Nones.
  
      self.assertEqual(testFilter[-1], None)
      self.assertEqual(testFilter[-2], 9)
      self.assertEqual(
          testFilter[-4], 8
      )  # We go 3 instead of 2 because we need to skip the interleaved None values.
  
      self.assertEqual(testFilter[18], 9)
      self.assertEqual(testFilter[19], None)
      # Absolut pos 20 should have the next value once we insert it, but right now it should be invalid.
      with self.assertRaises(IndexError):
          testFilter[20]
      ds.append(10)
      self.assertEqual(testFilter[20], 10)
  
file_path: pyalgotrade/testcases/technical_test.py
imports: from .None import common
  from pyalgotrade import technical
  from pyalgotrade import dataseries
label_desc: Use image node_id 1 for calling the DataSeriesFilterTest obj's underlying member method code with example usage: obj.testInvalidPosNotCached() without return types