code: def __init__(self, builder: Builder) -> None:
      super().__init__()
      self.builder = builder
  
      # A lambda function to generate translator lazily
      self.translator_class = (
          lambda document: self.builder.create_translator(document)
      )
  
file_path: sphinx/sphinx/writers/xml.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Any
  from docutils.writers.docutils_xml import Writer
label_desc: Use image node_id 1 to create a new XMLWriter object from inherited base classes: BaseXMLWriter with example: obj = XMLWriter(builder)