code: def create_callback(self):
          
          def __callback(question_posed):
              logger.debug("%s: asked to choose between: %s" % (self._name, self._qstr(question_posed)))
              if self._upto == len(self._data):
                  logger.error("%s: out of automation data, requested to pick between %s" % (self._name, self._qstr(question_posed)))
                  raise AutomationException("out of automation data")
              question_archived, answer = self._data[self._upto]
              if question_archived != question_posed:
                  logger.error("%s: automation data mismatch, expected question `%s', got question `%s'" % (self._name, self._qstr(question_archived), self._qstr(question_posed)))
              resp = question_posed.index(answer)
              self._upto += 1
              return resp
          return __callback
docs: create a callback, suitable to be passed to SenateCounter