@ndb.tasklet<EOL>def get_nickname(userid):
account = yield get_account(userid)<EOL>if not account:<EOL><INDENT>nickname = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>nickname = account.nickname or account.email<EOL><DEDENT>raise ndb.Return(nickname)<EOL>
Return a Future for a nickname from an account.