code: def parse_value(source: SourceType, **options: dict) -> ValueNode:
      
      if isinstance(source, str):
          source = Source(source)
      lexer = Lexer(source, **options)
      expect_token(lexer, TokenKind.SOF)
      value = parse_value_literal(lexer, False)
      expect_token(lexer, TokenKind.EOF)
      return value
docs: Parse the AST for a given string containing a GraphQL value.
  
      Throws GraphQLError if a syntax error is encountered.
  
      This is useful within tools that operate upon GraphQL Values directly and in
      isolation of complete GraphQL documents.
  
      Consider providing the results to the utility function: `value_from_ast()`.