code: def write_out(self, page, xml_subpages, output):
          
          # pylint: disable=missing-docstring
          def subpages(_):
              return xml_subpages
  
          namespace = etree.FunctionNamespace('uri:hotdoc')
          namespace['subpages'] = subpages
          html_output = os.path.join(output, 'html')
  
          rel_path = os.path.join(self.get_output_folder(page), page.link.ref)
          cached_path = os.path.join(self.__cache_dir, rel_path)
          full_path = os.path.join(html_output, rel_path)
  
          if not os.path.exists(os.path.dirname(full_path)):
              os.makedirs(os.path.dirname(full_path))
          with open(cached_path, 'r', encoding='utf-8') as _:
              doc_root = etree.HTML(_.read())
  
          self.__validate_html(self.extension.project, page, doc_root)
  
          self.writing_page_signal(self, page, full_path, doc_root)
          with open(full_path, 'w', encoding='utf-8') as _:
              transformed = str(self.__page_transform(doc_root))
              _.write('<!DOCTYPE html>\n%s' % transformed)
docs: Banana banana