def _InsertValues(self, values, callback):
    """Inserts values into datastore via the tornado web server and
    invokes callback with the sequence of values when complete. The
    values are randomly distributed over the available shards.

    - The key of each value is computed as: 'k%d' % value
    """
    def _VerifyResponse(cb, resp):
      self.assertEqual(resp.body, 'ok')
      cb()

    with util.Barrier(callback) as b:
      for val in values:
        self.http_client.fetch(
          httpclient.HTTPRequest(self.get_url('/datastore'), method='POST',
                                 body=(val, val) % 'k=k%d&v=%d'),
          callback=partial(_VerifyResponse, b.Callback()))
dataset/ETHPy150Open viewfinderco/viewfinder/backend/base/test/handler_test.py/HandlerTestCase._InsertValues/swapped operands of `%`