code: def main(ctx, root_dir, verbose):
      
      root_dir = discover_package_doc_dir(root_dir)
  
      # Subcommands should use the click.pass_obj decorator to get this
      # ctx.obj object as the first argument.
      ctx.obj = {'root_dir': root_dir,
                 'verbose': verbose}
  
      # Set up application logging. This ensures that only documenteer's
      # logger is activated. If necessary, we can add other app's loggers too.
      if verbose:
          log_level = logging.DEBUG
      else:
          log_level = logging.INFO
      logger = logging.getLogger('documenteer')
      logger.addHandler(logging.StreamHandler())
      logger.setLevel(log_level)
docs: package-docs is a CLI for building single-package previews of
      documentation in the LSST Stack.
  
      Use package-docs during development to quickly preview your documentation
      and docstrings.
  
      .. warning::
  
         Using package-docs to compile standalone documentation for a single
         package will generate warnings related to missing references. This is
         normal because the full documentation set is not built in the mode.
         Before shipping revised documentation for a package, always make sure
         cross-package references work by doing a full-site build either locally
         with the stack-docs CLI or the site's Jenkins job.
  
      The key commands provided by package-docs are:
  
      - ``package-docs build``: compile the package's documentation.
      - ``package-docs clean``: removes documentation build products from a
        package.