code: def main(output=None):
      if output is None:
          directory = tempfile.TemporaryDirectory(
              prefix="mkdocs_integration-"
          )
          output = directory.name
  
      log.propagate = False
      stream = logging.StreamHandler()
      formatter = logging.Formatter(
          "\033[1m\033[1;32m *** %(message)s *** \033[0m"
      )
      stream.setFormatter(formatter)
      log.addHandler(stream)
      log.setLevel(logging.DEBUG)
  
      base_cmd = ["mkdocs", "build", "-q", "-s", "--site-dir"]
  
      log.debug("Building installed themes.")
      for theme in sorted(MKDOCS_THEMES):
          log.debug(f"Building theme: {theme}")
          project_dir = os.path.dirname(MKDOCS_CONFIG)
          out = os.path.join(output, theme)
          command = [*base_cmd, out, "--theme", theme]
          subprocess.check_call(command, cwd=project_dir)
  
      log.debug("Building test projects.")
      for project in os.listdir(TEST_PROJECTS):
          project_dir = os.path.join(TEST_PROJECTS, project)
          if not os.path.isdir(project_dir):
              continue
          log.debug(f"Building test project: {project}")
          out = os.path.join(output, project)
          command = [*base_cmd, out]
          subprocess.check_call(command, cwd=project_dir)
  
      log.debug(f"Theme and integration builds are in {output}")
  
imports: import logging
  import os
  import subprocess
  import tempfile
  import click
label_desc: Use image node_id 1 for calling a global function with example usage: main(output) without return types