code: def parse_document_start(self):
      # Parse any extra document end indicators.
      while self.check_token(DocumentEndToken):
          self.get_token()
  
      # Parse an explicit document.
      if not self.check_token(StreamEndToken):
          token = self.peek_token()
          start_mark = token.start_mark
          version, tags = self.process_directives()
          if not self.check_token(DocumentStartToken):
              raise ParserError(
                  None,
                  None,
                  "expected '<document start>', but found %r"
                  % self.peek_token().id,
                  self.peek_token().start_mark,
              )
          token = self.get_token()
          end_mark = token.end_mark
          event = DocumentStartEvent(
              start_mark,
              end_mark,
              explicit=True,
              version=version,
              tags=tags,
          )
          self.states.append(self.parse_document_end)
          self.state = self.parse_document_content
      else:
          # Parse the end of the stream.
          token = self.get_token()
          event = StreamEndEvent(token.start_mark, token.end_mark)
          assert not self.states
          assert not self.marks
          self.state = None
      return event
  
imports: from .error import MarkedYAMLError
  from .tokens import *
  from .events import *
  from .scanner import *
label_desc: Use image node_id 8 for calling the Parser obj's underlying member method code with example usage: obj.parse_document_start() and returns: event