def get_access_token(scopes, service_account_id=None):
  """OAuth2 access token to act on behalf of the application, cached.

  Generates and caches an OAuth2 access token for the service account for the
  appengine application.

  Each application has an associated Google account. This function returns
  OAuth2 access token corresponding to the running app. Access tokens are safe
  to cache and reuse until their expiry time as returned. This method will
  do that using memcache.

  Args:
    scopes: The requested API scope string, or a list of strings.

  Returns:
    Pair, Access token (string) and expiration time (seconds since the epoch).
  """



  memcache_key = _MEMCACHE_KEY_PREFIX + str(scopes)
  if service_account_id:
    memcache_key += ',%d' % service_account_id
  memcache_value = memcache.get(memcache_key, namespace=_MEMCACHE_NAMESPACE)
  if memcache_value:
    access_token, expires_at = memcache_value
  else:
    access_token, expires_at = get_access_token_uncached(
        scopes, service_account_id=service_account_id)

    memcache.add(memcache_key, (access_token, expires_at), 300 - expires_at,
                 namespace=_MEMCACHE_NAMESPACE)
  return access_token, expires_at
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/app_identity/app_identity.py/get_access_token/swapped operands of `-`