code: def GetAPIScope(api_name):
    
    try:
      return SCOPES[api_name]
    except KeyError:
      raise googleads.errors.GoogleAdsValueError(
          'Invalid API name "%s" provided. Acceptable values are: %s' %
          (api_name, SCOPES.keys()))
docs: Retrieves the scope for the given API name.
  
    Args:
      api_name: A string identifying the name of the API we want to retrieve a
          scope for.
  
    Returns:
      A string that is the scope for the given API name.
  
    Raises:
      GoogleAdsValueError: If the given api_name is invalid; accepted values are
          "adwords" and "ad_manager".