code: def testSPRegion(self):
      results1 = createAndRunNetwork(SPRegion, "bottomUpOut")
  
      results2 = createAndRunNetwork(
          SPRegion, "bottomUpOut", checkpointMidway=True
      )
  
      self.assertEqual(len(results1), len(results2))
  
      for i in xrange(len(results1)):
          result1 = list(results1[i].nonzero()[0])
          result2 = list(results2[i].nonzero()[0])
          self.assertEqual(
              result1,
              result2,
              "Row {0} not equal: {1} vs. {2}".format(
                  i, result1, result2
              ),
          )
  
file_path: nupic-legacy/tests/integration/nupic/engine/network_checkpoint_test.py
imports: import unittest
  import numpy
  from nupic.regions.record_sensor import RecordSensor
  from nupic.regions.sp_region import SPRegion
  from nupic.regions.tm_region import TMRegion
  from network_creation_common import createAndRunNetwork
label_desc: Use image node_id 2 for calling the NetworkCheckpointTest obj's underlying member method code with example usage: obj.testSPRegion() without return types