code: def rename_use_earliest_to_ambiguous(
      use_earliest: bool | None, ambiguous: Ambiguous | Expr
  ) -> Ambiguous | Expr:
      """Issue deprecation warning if deprecated `use_earliest` argument is used."""
      if isinstance(use_earliest, bool):
          ambiguous = USE_EARLIEST_TO_AMBIGUOUS[use_earliest]
          warnings.warn(
              "The argument 'use_earliest' in 'replace_time_zone' is deprecated. "
              f"Please replace `use_earliest={use_earliest}` with "
              f"`ambiguous='{ambiguous}'`. Note that this new argument can also "
              "accept expressions.",
              DeprecationWarning,
              stacklevel=find_stacklevel(),
          )
          return ambiguous
      return ambiguous
  
file_path: polars/py-polars/polars/utils/deprecation.py
imports: from __future__ import annotations
  import inspect
  import warnings
  from functools import wraps
  from typing import TYPE_CHECKING, Callable, TypeVar
  from polars.utils.various import find_stacklevel
label_desc: Use image node_id 8 for calling a global function with example usage: rename_use_earliest_to_ambiguous(use_earliest, ambiguous) and returns: ambiguous, ambiguous