code: def add_testvalue_and_checking_configvars():
      config.add(
          "print_test_value",
          (
              "If 'True', the __eval__ of an PyTensor variable will return its test_value "
              "when this is available. This has the practical consequence that, e.g., "
              "in debugging `my_var` will print the same as `my_var.tag.test_value` "
              "when a test value is defined."
          ),
          BoolParam(False),
          in_c_key=False,
      )
  
      config.add(
          "compute_test_value",
          (
              "If 'True', PyTensor will run each op at graph build time, using "
              "Constants, SharedVariables and the tag 'test_value' as inputs "
              "to the function. This helps the user track down problems in the "
              "graph before it gets optimized."
          ),
          EnumStr("off", ["ignore", "warn", "raise", "pdb"]),
          in_c_key=False,
      )
  
      config.add(
          "compute_test_value_opt",
          (
              "For debugging PyTensor optimization only."
              " Same as compute_test_value, but is used"
              " during PyTensor optimization"
          ),
          EnumStr("off", ["ignore", "warn", "raise", "pdb"]),
          in_c_key=False,
      )
      config.add(
          "check_input",
          "Specify if types should check their input in their C code. "
          "It can be used to speed up compilation, reduce overhead "
          "(particularly for scalars) and reduce the number of generated C "
          "files.",
          BoolParam(True),
          in_c_key=True,
      )
      config.add(
          "NanGuardMode__nan_is_error",
          "Default value for nan_is_error",
          BoolParam(True),
          in_c_key=False,
      )
  
      config.add(
          "NanGuardMode__inf_is_error",
          "Default value for inf_is_error",
          BoolParam(True),
          in_c_key=False,
      )
  
      config.add(
          "NanGuardMode__big_is_error",
          "Default value for big_is_error",
          BoolParam(True),
          in_c_key=False,
      )
  
      config.add(
          "NanGuardMode__action",
          "What NanGuardMode does when it finds a problem",
          EnumStr("raise", ["warn", "pdb"]),
          in_c_key=False,
      )
  
      config.add(
          "DebugMode__patience",
          "Optimize graph this many times to detect inconsistency",
          IntParam(10, _is_gt_0),
          in_c_key=False,
      )
  
      config.add(
          "DebugMode__check_c",
          "Run C implementations where possible",
          BoolParam(_has_cxx),
          in_c_key=False,
      )
  
      config.add(
          "DebugMode__check_py",
          "Run Python implementations where possible",
          BoolParam(True),
          in_c_key=False,
      )
  
      config.add(
          "DebugMode__check_finite",
          "True -> complain about NaN/Inf results",
          BoolParam(True),
          in_c_key=False,
      )
  
      config.add(
          "DebugMode__check_strides",
          (
              "Check that Python- and C-produced ndarrays have same strides. "
              "On difference: (0) - ignore, (1) warn, or (2) raise error"
          ),
          # TODO: make this an Enum setting
          IntParam(0, _is_valid_check_strides),
          in_c_key=False,
      )
  
      config.add(
          "DebugMode__warn_input_not_reused",
          (
              "Generate a warning when destroy_map or view_map says that an "
              "op works inplace, but the op did not reuse the input for its "
              "output."
          ),
          BoolParam(True),
          in_c_key=False,
      )
  
      config.add(
          "DebugMode__check_preallocated_output",
          (
              "Test thunks with pre-allocated memory as output storage. "
              'This is a list of strings separated by ":". Valid values are: '
              '"initial" (initial storage in storage map, happens with Scan),'
              '"previous" (previously-returned memory), '
              '"c_contiguous", "f_contiguous", '
              '"strided" (positive and negative strides), '
              '"wrong_size" (larger and smaller dimensions), and '
              '"ALL" (all of the above).'
          ),
          StrParam(
              "", validate=_is_valid_check_preallocated_output_param
          ),
          in_c_key=False,
      )
  
      config.add(
          "DebugMode__check_preallocated_output_ndim",
          (
              'When testing with "strided" preallocated output memory, '
              "test all combinations of strides over that number of "
              "(inner-most) dimensions. You may want to reduce that number "
              "to reduce memory or time usage, but it is advised to keep a "
              "minimum of 2."
          ),
          IntParam(4, _is_gt_0),
          in_c_key=False,
      )
  
      config.add(
          "profiling__time_thunks",
          """Time individual thunks when profiling""",
          BoolParam(True),
          in_c_key=False,
      )
  
      config.add(
          "profiling__n_apply",
          "Number of Apply instances to print by default",
          IntParam(20, _is_gt_0),
          in_c_key=False,
      )
  
      config.add(
          "profiling__n_ops",
          "Number of Ops to print by default",
          IntParam(20, _is_gt_0),
          in_c_key=False,
      )
  
      config.add(
          "profiling__output_line_width",
          "Max line width for the profiling output",
          IntParam(512, _is_gt_0),
          in_c_key=False,
      )
  
      config.add(
          "profiling__min_memory_size",
          """For the memory profile, do not print Apply nodes if the size
                   of their outputs (in bytes) is lower than this threshold""",
          IntParam(1024, _is_greater_or_equal_0),
          in_c_key=False,
      )
  
      config.add(
          "profiling__min_peak_memory",
          """The min peak memory usage of the order""",
          BoolParam(False),
          in_c_key=False,
      )
  
      config.add(
          "profiling__destination",
          """File destination of the profiling output""",
          StrParam("stderr"),
          in_c_key=False,
      )
  
      config.add(
          "profiling__debugprint",
          """Do a debugprint of the profiled functions""",
          BoolParam(False),
          in_c_key=False,
      )
  
      config.add(
          "profiling__ignore_first_call",
          """Do we ignore the first call of an PyTensor function.""",
          BoolParam(False),
          in_c_key=False,
      )
  
      config.add(
          "on_shape_error",
          "warn: print a warning and use the default value. raise: raise an error",
          EnumStr("warn", ["raise"]),
          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 27 for calling a global function with example usage: add_testvalue_and_checking_configvars() without return types