<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def inferTM(self, bottomUp, externalInput):
 """ Run inference and return the set of predicted cells """

    self.reset()
    # print >> sys.stderr, "Bottom up: ", bottomUp
    # print >> sys.stderr, "ExternalInput: ",externalInput
    self.tm.compute(bottomUp,
                    basalInput=externalInput,
                    learn=False)
    # print >> sys.stderr, ("new active cells " + str(self.tm.getActiveCells()))
    # print >> sys.stderr, ("new predictive cells " + str(self.tm.getPredictiveCells()))
    return self.tm.getPredictiveCells()