code: def autoreload(args, excqueue=None):
      console.print(
          "  --- AutoReload Mode: Monitoring `content`, `theme` and"
          " `settings` for changes. ---"
      )
      pelican, settings = get_instance(args)
      settings_file = os.path.abspath(args.settings)
      while True:
          try:
              pelican.run()
  
              changed_files = wait_for_changes(
                  args.settings, Readers, settings
              )
              changed_files = {c[1] for c in changed_files}
  
              if settings_file in changed_files:
                  pelican, settings = get_instance(args)
  
              console.print(
                  "\n-> Modified: {}. re-generating...".format(
                      ", ".join(changed_files)
                  )
              )
  
          except KeyboardInterrupt:
              if excqueue is not None:
                  excqueue.put(None)
                  return
              raise
  
          except Exception as e:
              if args.verbosity == logging.DEBUG:
                  if excqueue is not None:
                      excqueue.put(
                          traceback.format_exception_only(type(e), e)[
                              -1
                          ]
                      )
                  else:
                      raise
              logger.warning(
                  'Caught exception:\n"%s".',
                  e,
                  exc_info=settings.get("DEBUG", False),
              )
  
imports: import argparse
  import importlib.metadata
  import json
  import logging
  import multiprocessing
  import os
  import pprint
  import sys
  import time
  import traceback
  from collections.abc import Iterable
  from pkgutil import extend_path
  from pelican.log import console
  from pelican.log import init
  from pelican.generators import ArticlesGenerator, PagesGenerator, SourceFileGenerator, StaticGenerator, TemplatePagesGenerator
  from pelican.plugins import signals
  from pelican.plugins._utils import get_plugin_name, load_plugins
  from pelican.readers import Readers
  from pelican.server import ComplexHTTPRequestHandler, RootedHTTPServer
  from pelican.settings import read_settings
  from pelican.utils import clean_output_dir, maybe_pluralize, wait_for_changes
  from pelican.writers import Writer
label_desc: Use image node_id 4 for calling a global function with example usage: autoreload(args, excqueue) without return types