class_docstr: A base class of readers for Sphinx.
  
  This replaces reporter by Sphinx's on generating document.
docstr: Creates a new document object which has a special reporter object good
  for logging.
code: def new_document(self) -> nodes.document:
      """
      Creates a new document object which has a special reporter object good
      for logging.
      """
      document = super().new_document()
      document.__class__ = (
          addnodes.document
      )  # replace the class with patched version
  
      # substitute transformer
      document.transformer = SphinxTransformer(document)
      document.transformer.set_environment(self.settings.env)
  
      # substitute reporter
      reporter = document.reporter
      document.reporter = LoggingReporter.from_reporter(reporter)
  
      return document
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any
  import docutils
  from docutils import nodes
  from docutils.core import Publisher
  from docutils.io import FileInput, Input, NullOutput
  from docutils.readers import standalone
  from docutils.transforms.references import DanglingReferences
  from docutils.writers import UnfilteredWriter
  from sphinx import addnodes
  from sphinx.transforms import AutoIndexUpgrader, DoctreeReadEvent, SphinxTransformer
  from sphinx.transforms.i18n import Locale, PreserveTranslatableMessages, RemoveTranslatableInline
  from sphinx.transforms.references import SphinxDomains
  from sphinx.util import logging
  from sphinx.util.docutils import LoggingReporter
  from sphinx.versioning import UIDTransform
label_desc: Use image node_id 4 for calling the SphinxBaseReader obj's underlying member method code with example usage: obj.new_document() and returns: document