code: def runMultiplePassSPonly(df, model, nMultiplePass, nTrain):
    
  
    predictedField = model.getInferenceArgs()['predictedField']
    print "run TM through the train data multiple times"
    for nPass in xrange(nMultiplePass):
      for j in xrange(nTrain):
        inputRecord = getInputRecord(df, predictedField, j)
        model._sensorCompute(inputRecord)
        model._spCompute()
        if j % 400 == 0:
          print " pass %i, record %i" % (nPass, j)
  
    return model
docs: run CLA model SP through data record 0:nTrain nMultiplePass passes