code: def load_dotenv(path: str | os.PathLike | None = None) -> bool:
      """Load "dotenv" files in order of precedence to set environment variables.
  
      If an env var is already set it is not overwritten, so earlier files in the
      list are preferred over later files.
  
      This is a no-op if `python-dotenv`_ is not installed.
  
      .. _python-dotenv: https://github.com/theskumar/python-dotenv#readme
  
      :param path: Load the file at this location instead of searching.
      :return: ``True`` if a file was loaded.
  
      .. versionchanged:: 2.0
          The current directory is not changed to the location of the
          loaded file.
  
      .. versionchanged:: 2.0
          When loading the env files, set the default encoding to UTF-8.
  
      .. versionchanged:: 1.1.0
          Returns ``False`` when python-dotenv is not installed, or when
          the given path isn't a file.
  
      .. versionadded:: 1.0
      """
      try:
          import dotenv
      except ImportError:
          if (
              path
              or os.path.isfile(".env")
              or os.path.isfile(".flaskenv")
          ):
              click.secho(
                  " * Tip: There are .env or .flaskenv files present."
                  ' Do "pip install python-dotenv" to use them.',
                  fg="yellow",
                  err=True,
              )
  
          return False
  
      # Always return after attempting to load a given path, don't load
      # the default files.
      if path is not None:
          if os.path.isfile(path):
              return dotenv.load_dotenv(path, encoding="utf-8")
  
          return False
  
      loaded = False
  
      for name in (".env", ".flaskenv"):
          path = dotenv.find_dotenv(name, usecwd=True)
  
          if not path:
              continue
  
          dotenv.load_dotenv(path, encoding="utf-8")
          loaded = True
  
      return loaded
  
imports: from __future__ import annotations
  import ast
  import importlib.metadata
  import inspect
  import os
  import platform
  import re
  import sys
  import traceback
  import typing
  from functools import update_wrapper
  from operator import itemgetter
  import click
  from click.core import ParameterSource
  from werkzeug import run_simple
  from werkzeug.serving import is_running_from_reloader
  from werkzeug.utils import import_string
  from .globals import current_app
  from .helpers import get_debug_flag
  from .helpers import get_load_dotenv
label_desc: Use image node_id 12 for calling a global function with example usage: load_dotenv(path) and returns: loaded, False, False, dotenv