code: def testPeriod2(self):
      sma = self.__buildSMA(2, [0, 1, 2])
      self.assertEqual(sma[0], None)
      self.assertEqual(sma[1], (0 + 1) / float(2))
      self.assertEqual(sma[2], (1 + 2) / float(2))
      with self.assertRaises(IndexError):
          sma[3]
  
      self.assertEqual(len(sma.getDateTimes()), 3)
      for i in range(len(sma)):
          self.assertEqual(sma.getDateTimes()[i], None)
  
imports: from six.moves import xrange
  from .None import common
  from pyalgotrade.technical import ma
  from pyalgotrade import dataseries
  from pyalgotrade.barfeed import ninjatraderfeed
  from pyalgotrade import bar
label_desc: Use image node_id 3 for calling the SMATestCase obj's underlying member method code with example usage: obj.testPeriod2() without return types