code: def test_envset():
      true_values = ["", "True", "on", "yes", "Y", "1", "anything"]
      false_values = ["n", "No", "N", "fAlSE", "0", "0.0", "Off"]
      with patch.dict(
          "os.environ",
          ((f"FOO_{v}", v) for v in true_values + false_values),
      ):
          for v in true_values:
              assert paths.envset(f"FOO_{v}")
          for v in false_values:
              assert not paths.envset(f"FOO_{v}")
          # Test default value is False
          assert (
              paths.envset("THIS_VARIABLE_SHOULD_NOT_BE_SET") is False
          )
          # Test envset returns the given default if supplied
          assert (
              paths.envset("THIS_VARIABLE_SHOULD_NOT_BE_SET", None)
              is None
          )
  
imports: from __future__ import annotations
  import os
  import re
  import shutil
  import site
  import stat
  import subprocess
  import sys
  import tempfile
  import warnings
  from unittest.mock import patch
  import pytest
  from platformdirs import __version_info__
  from jupyter_core import paths
  from jupyter_core.paths import UF_HIDDEN, _win32_restrict_file_to_user_ctypes, exists, is_file_hidden, is_hidden, issue_insecure_write_warning, jupyter_config_dir, jupyter_config_path, jupyter_data_dir, jupyter_path, jupyter_runtime_dir, prefer_environment_over_user, secure_write
label_desc: Use image node_id 4 for calling a global function with example usage: test_envset() without return types