code: def expect(parser, kind):
      """If the next token is of the given kind, return that token after
      advancing the parser. Otherwise, do not change the parser state and
      return False."""
      token = parser.token
      if token.kind == kind:
          advance(parser)
          return token
  
      raise GraphQLSyntaxError(
          parser.source,
          token.start,
          "Expected {}, found {}".format(
              get_token_kind_desc(kind), get_token_desc(token)
          ),
      )
  
imports: from .None import ast
  from ..error import GraphQLSyntaxError
  from .lexer import Lexer, TokenKind, get_token_desc, get_token_kind_desc
  from .source import Source
label_desc: Use image node_id 7 for calling a global function with example usage: expect(parser, kind) and returns: token