def get_num_instances(server=None, version=None):
  req = servers_service_pb.GetNumInstancesRequest()
  if server:
    req.set_server(server)
  if version:
    req.set_version(version)
  resp = servers_service_pb.GetNumInstancesResponse()
  try:
    apiproxy_stub_map.MakeSyncCall('servers', 'GetNumInstances', req, resp)
  except apiproxy_errors.ApplicationError, e:
    if (e.application_error ==
        servers_service_pb.ServersServiceError.INVALID_VERSION):
      raise InvalidVersionError()
    else:
      raise Error()

  return resp.instances()
The directory containing the application e.g. "/home/user/myapp".
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/servers/servers.py/get_num_instances--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/devappserver2/application_configuration.py/BackendConfiguration.application_root