code: def deduce_cudf_pandas_mode(
      slow_lib: str, fast_lib: str
  ) -> DeducedMode:
      """
      Determine if cudf.pandas should use the requested fast library.
  
      Parameters
      ----------
      slow_lib
          Name of the slow library
      fast_lib
          Name of the fast library
  
      Returns
      -------
      Whether the fast library is being used, and the resulting names of
      the "slow" and "fast" libraries.
      """
      if "CUDF_PANDAS_FALLBACK_MODE" not in os.environ:
          try:
              importlib.import_module(fast_lib)
              return DeducedMode(
                  use_fast_lib=True,
                  slow_lib=slow_lib,
                  fast_lib=fast_lib,
              )
          except Exception as e:
              warnings.warn(
                  f"Exception encountered importing {fast_lib}: {e}."
                  f"Falling back to only using {slow_lib}."
              )
      return DeducedMode(
          use_fast_lib=False, slow_lib=slow_lib, fast_lib=slow_lib
      )
  
imports: from __future__ import annotations
  import contextlib
  import functools
  import importlib
  import importlib.abc
  import importlib.machinery
  import os
  import pathlib
  import sys
  import threading
  import warnings
  from abc import abstractmethod
  from importlib._bootstrap import _ImportLockContext
  from types import ModuleType
  from typing import Any, ContextManager, Dict, List, NamedTuple
  from typing_extensions import Self
  from .fast_slow_proxy import _FunctionProxy, _is_function_or_method, _Unusable, get_final_type_map, get_intermediate_type_map, get_registered_functions
label_desc: Use image node_id 2 for calling a global function with example usage: deduce_cudf_pandas_mode(slow_lib, fast_lib) and returns: DeducedMode, DeducedMode