code: def _check_dependencies():
      names = {
          **{ext: ext.split(".")[0] for ext in extensions},
          # Explicitly list deps that are not extensions, or whose PyPI package
          # name does not match the (toplevel) module name.
          "colorspacious": "colorspacious",
          "mpl_sphinx_theme": "mpl_sphinx_theme",
          "sphinxcontrib.inkscapeconverter": "sphinxcontrib-svg2pdfconverter",
      }
      missing = []
      for name in names:
          try:
              __import__(name)
          except ImportError:
              missing.append(names[name])
      if missing:
          raise ImportError(
              "The following dependencies are missing to build the "
              f"documentation: {', '.join(missing)}"
          )
  
      # debug sphinx-pydata-theme and mpl-theme-version
      if "mpl_sphinx_theme" not in missing:
          import pydata_sphinx_theme
          import mpl_sphinx_theme
  
          print(
              f"pydata sphinx theme: {pydata_sphinx_theme.__version__}"
          )
          print(f"mpl sphinx theme: {mpl_sphinx_theme.__version__}")
  
      if shutil.which("dot") is None:
          raise OSError(
              "No binary named dot - graphviz must be installed to build the "
              "documentation"
          )
      if shutil.which("latex") is None:
          raise OSError(
              "No binary named latex - a LaTeX distribution must be installed to build "
              "the documentation"
          )
  
file_path: matplotlib/doc/conf.py
imports: from datetime import datetime, timezone
  import logging
  import os
  from pathlib import Path
  import shutil
  import subprocess
  import sys
  import time
  from urllib.parse import urlsplit, urlunsplit
  import warnings
  import sphinx
  import yaml
  import matplotlib
  import sphinxext.gallery_order
  from sphinx_gallery import gen_rst
label_desc: Use image node_id 2 for calling a global function with example usage: _check_dependencies() without return types