code: def add_caching_dir_configvars():
      _compiledir_format_dict["gxx_version"] = (
          gcc_version_str.replace(" ", "_"),
      )
      _compiledir_format_dict["short_platform"] = short_platform()
      # Allow to have easily one compiledir per device.
      _compiledir_format_dict["device"] = config.device
      compiledir_format_keys = ", ".join(
          sorted(_compiledir_format_dict.keys())
      )
      _default_compiledir_format = (
          "compiledir_%(short_platform)s-%(processor)s-"
          "%(python_version)s-%(python_bitwidth)s"
      )
  
      config.add(
          "compiledir_format",
          textwrap.fill(
              textwrap.dedent(
                  f"""\
                       Format string for platform-dependent compiled
                       module subdirectory (relative to base_compiledir).
                       Available keys: {compiledir_format_keys}. Defaults to {_default_compiledir_format}.
                   """
              )
          ),
          StrParam(_default_compiledir_format, mutable=False),
          in_c_key=False,
      )
  
      # On Windows we should avoid writing temporary files to a directory that is
      # part of the roaming part of the user profile. Instead we use the local part
      # of the user profile, when available.
      if (
          sys.platform == "win32"
          and os.getenv("LOCALAPPDATA") is not None
      ):
          default_base_compiledir = os.path.join(
              os.getenv("LOCALAPPDATA"), "PyTensor"
          )
      else:
          default_base_compiledir = os.path.join(
              _get_home_dir(), ".pytensor"
          )
  
      config.add(
          "base_compiledir",
          "platform-independent root directory for compiled modules",
          ConfigParam(
              default_base_compiledir,
              apply=_filter_base_compiledir,
              mutable=False,
          ),
          in_c_key=False,
      )
  
      config.add(
          "compiledir",
          "platform-dependent cache directory for compiled modules",
          ConfigParam(
              _default_compiledir,
              apply=_filter_compiledir,
              mutable=False,
          ),
          in_c_key=False,
      )
  
imports: import errno
  import logging
  import os
  import platform
  import re
  import socket
  import sys
  import textwrap
  import numpy
  from setuptools._distutils.spawn import find_executable
  import pytensor
  from pytensor.configparser import BoolParam, ConfigParam, DeviceParam, EnumStr, FloatParam, IntParam, StrParam, _create_default_config
  from pytensor.utils import LOCAL_BITWIDTH, PYTHON_INT_BITWIDTH, call_subprocess_Popen, maybe_add_to_os_environ_pathlist, output_subprocess_Popen
label_desc: Use image node_id 40 for calling a global function with example usage: add_caching_dir_configvars() without return types