code: def parse(source, **kwargs):
      # type: (Union[Source, str], **Any) -> Document
      
      options = {"no_location": False, "no_source": False}
      options.update(kwargs)
  
      if isinstance(source, string_types):
          source_obj = Source(source)  # type: Source
      else:
          source_obj = source  # type: ignore
  
      parser = Parser(source_obj, options)
      return parse_document(parser)
docs: Given a GraphQL source, parses it into a Document.