def set_num_instances_async(instances, module=None, version=None):
 def _ResultHook(rpc):
  mapped_errors = [modules_service_pb.ModulesServiceError.INVALID_VERSION, modules_service_pb.ModulesServiceError.TRANSIENT_ERROR]
  _CheckAsyncResult(rpc, mapped_errors, {})
 if (not isinstance(instances, (long, int))):
  raise TypeError("'instances' arg must be of type long or int.")
 request = modules_service_pb.SetNumInstancesRequest()
 request.set_instances(instances)
 if module:
  request.set_module(module)
 if version:
  request.set_version(version)
 response = modules_service_pb.SetNumInstancesResponse()
 return _MakeAsyncCall('SetNumInstances', request, response, _ResultHook)

def set_num_instances_async ( instances , module = None , version = None ) : def _ResultHook ( rpc ) : mapped_errors = [ modules_service_pb . ModulesServiceError . INVALID_VERSION , modules_service_pb . ModulesServiceError . TRANSIENT_ERROR ] _CheckAsyncResult ( rpc , mapped_errors , { } ) if ( not isinstance ( instances , ( long , int ) ) ) : raise TypeError ( "'instances' arg must be of type long or int." ) request = modules_service_pb . SetNumInstancesRequest ( ) request . set_instances ( instances ) if module : request . set_module ( module ) if version : request . set_version ( version ) response = modules_service_pb . SetNumInstancesResponse ( ) return _MakeAsyncCall ( 'SetNumInstances' , request , response , _ResultHook )
returns a userrpc to set the number of instances on the module version .