code: def write_file(name: str, text: str, opts: Any) -> None:
      """Write the output file for module/package <name>."""
      quiet = getattr(opts, "quiet", None)
  
      fname = path.join(opts.destdir, f"{name}.{opts.suffix}")
      if opts.dryrun:
          if not quiet:
              logger.info(__("Would create file %s."), fname)
          return
      if not opts.force and path.isfile(fname):
          if not quiet:
              logger.info(
                  __("File %s already exists, skipping."), fname
              )
      else:
          if not quiet:
              logger.info(__("Creating file %s."), fname)
          with FileAvoidWrite(fname) as f:
              f.write(text)
  
imports: from __future__ import annotations
  import argparse
  import fnmatch
  import glob
  import locale
  import os
  import re
  import sys
  from copy import copy
  from importlib.machinery import EXTENSION_SUFFIXES
  from os import path
  from typing import TYPE_CHECKING, Any
  import sphinx.locale
  from sphinx import __display_version__, package_dir
  from sphinx.cmd.quickstart import EXTENSIONS
  from sphinx.locale import __
  from sphinx.util import logging
  from sphinx.util.osutil import FileAvoidWrite, ensuredir
  from sphinx.util.template import ReSTRenderer
label_desc: Use image node_id 4 for calling a global function with example usage: write_file(name, text, opts) without return types