def translate(self) -> None:
    visitor = self.builder.create_translator(self.document, self.builder)
    self.visitor = cast(TexinfoTranslator, visitor)
    self.document.walkabout(visitor)
    self.visitor.finish()
    for attr in self.visitor_attributes:
        setattr(self, attr, getattr(self.visitor, attr))
def translate(self) -> None:
    visitor = self.builder.create_translator(self.document, self.builder)
    self.visitor = cast(TexinfoTranslator, visitor)
    self.document.walkabout(visitor)
    self.visitor.finish()
    for attr in self.visitor_attributes:
        setattr(self, attr, getattr(self.visitor, attr))