<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unexpected(lexer: Lexer, at_token: Token = None) -> GraphQLError: """Create an error when an unexpected lexed token is encountered."""

    token = at_token or lexer.token
    return GraphQLSyntaxError(lexer.source, token.start, f"Unexpected {token.desc}")