def offset_multi_async(self, mapping, key_prefix='',
                         namespace=None, initial_value=None, rpc=None):
    initial_flags = None
    if initial_value is not None:
      if not isinstance(initial_value, (int, long)):
        raise TypeError('initial_value must be an integer')
      if initial_value < 0:
        raise ValueError('initial_value must be >= 0')
      if isinstance(initial_value, int):
        initial_flags = TYPE_INT
      else:
        initial_flags = TYPE_LONG

    request = MemcacheBatchIncrementRequest()
    self._add_app_id(request)
    response = MemcacheBatchIncrementResponse()
    _add_name_space(request, namespace)

    for key, delta in mapping.iteritems():
      if not isinstance(delta, (int, long)):
        raise TypeError('Delta must be an integer or long, received %r' % delta)
      if delta >= 0:
        direction = MemcacheIncrementRequest.INCREMENT
      else:
        delta = -delta
        direction = MemcacheIncrementRequest.DECREMENT

      server_key = _key_string(key, key_prefix)

      item = request.add_item()
      item.set_key(server_key)
      item.set_delta(delta)
      item.set_direction(direction)
      if initial_value is not None:
        item.set_initial_value(initial_value)
        item.set_initial_flags(initial_flags)


    return self._make_async_call(rpc, 'BatchIncrement', request, response,
                                 self.__offset_hook, mapping)
Sets the number of instances for this module to run.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/memcache/__init__.py/Client.offset_multi_async--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/devappserver2/module.py/Module.set_num_instances