code: def parse_document(parser):
      start = parser.token.start
      definitions = []
      while True:
          definitions.append(parse_definition(parser))
  
          if skip(parser, TokenKind.EOF):
              break
  
      return ast.Document(
          definitions=definitions, loc=loc(parser, start)
      )
  
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 13 for calling a global function with example usage: parse_document(parser) and returns: ast