code: def envset(
      name: str, default: Optional[bool] = False
  ) -> Optional[bool]:
      """Return the boolean value of a given environment variable.
  
      An environment variable is considered set if it is assigned to a value
      other than 'no', 'n', 'false', 'off', '0', or '0.0' (case insensitive)
  
      If the environment variable is not defined, the default value is returned.
      """
      if name not in os.environ:
          return default
  
      return os.environ[name].lower() not in [
          "no",
          "n",
          "false",
          "off",
          "0",
          "0.0",
      ]
  
imports: from __future__ import annotations
  import errno
  import os
  import site
  import stat
  import sys
  import tempfile
  import warnings
  from contextlib import contextmanager
  from pathlib import Path
  from typing import Any, Iterator, Optional
  import platformdirs
  from .utils import deprecation
label_desc: Use image node_id 1 for calling a global function with example usage: envset(name, default) and returns: unknown, default