code: def generate(dest_dir):
      template_dir = autokeras_dir / "docs" / "templates"
      doc_generator = keras_autodoc.DocumentationGenerator(
          PAGES,
          "https://github.com/keras-team/autokeras/blob/master",
          template_dir,
          autokeras_dir / "examples",
          extra_aliases=aliases_needed,
      )
      doc_generator.generate(dest_dir)
      readme = (autokeras_dir / "README.md").read_text()
      index = (template_dir / "index.md").read_text()
      index = index.replace(
          "{{autogenerated}}", readme[readme.find("##") :]
      )
      (dest_dir / "index.md").write_text(index, encoding="utf-8")
      shutil.copyfile(
          autokeras_dir / ".github" / "CONTRIBUTING.md",
          dest_dir / "contributing.md",
      )
  
      py_to_nb_md(dest_dir)
  
imports: import os
  import pathlib
  import shutil
  import keras_autodoc
  import tutobooks
label_desc: Use image node_id 2 for calling a global function with example usage: generate(dest_dir) without return types