<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(parser, at_token=None):
 # type: (Parser, Optional[Any]) -> GraphQLSyntaxError """Helper function for creating an error when an unexpected lexed token is encountered."""

    token = at_token or parser.token
    return GraphQLSyntaxError(
        parser.source, token.start, u"Unexpected {}".format(get_token_desc(token))
    )