code: def _parse_skip_subdirs_file():
      """
      Read .mpl_skip_subdirs.yaml for subdirectories to not
      build if we do `make html-skip-subdirs`.  Subdirectories
      are relative to the toplevel directory.  Note that you
      cannot skip 'users' as it contains the table of contents,
      but you can skip subdirectories of 'users'.  Doing this
      can make partial builds very fast.
      """
      default_skip_subdirs = [
          "users/prev_whats_new/*",
          "users/explain/*",
          "api/*",
          "gallery/*",
          "tutorials/*",
          "plot_types/*",
          "devel/*",
      ]
      try:
          with open(".mpl_skip_subdirs.yaml", "r") as fin:
              print(
                  "Reading subdirectories to skip from",
                  ".mpl_skip_subdirs.yaml",
              )
              out = yaml.full_load(fin)
          return out["skip_subdirs"]
      except FileNotFoundError:
          # make a default:
          with open(".mpl_skip_subdirs.yaml", "w") as fout:
              yamldict = {
                  "skip_subdirs": default_skip_subdirs,
                  "comment": "For use with make html-skip-subdirs",
              }
              yaml.dump(yamldict, fout)
          print(
              "Skipping subdirectories, but .mpl_skip_subdirs.yaml",
              "not found so creating a default one. Edit this file",
              "to customize which directories are included in build.",
          )
  
          return default_skip_subdirs
  
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 1 for calling a global function with example usage: _parse_skip_subdirs_file() and returns: out, default_skip_subdirs