code: def upgrade_api(request, client, version):
      
  
      min_ver, max_ver = api_versions._get_server_version_range(client)
      if min_ver <= api_versions.APIVersion(version) <= max_ver:
          client = _nova.novaclient(request, version)
      return client
docs: Ugrade the nova API to the specified version if possible.