@ndb.tasklet
def _make_token_async(scopes, service_account_id):
 rpc = app_identity.create_rpc()
 app_identity.make_get_access_token_call(rpc, scopes, service_account_id)
 (token, expires_at) = (yield rpc)
 raise ndb.Return((token, expires_at))

@ ndb . tasklet def _make_token_async ( scopes , service_account_id ) : rpc = app_identity . create_rpc ( ) app_identity . make_get_access_token_call ( rpc , scopes , service_account_id ) ( token , expires_at ) = ( yield rpc ) raise ndb . Return ( ( token , expires_at ) )
get a fresh authentication token .