code: def resolve_umap_engine(
      engine: UMAPEngine,
  ) -> UMAPEngineConcrete:  # noqa
      if engine in [CUML, UMAP_LEARN]:
          return engine  # type: ignore
      if engine in ["auto"]:
          has_cuml_dependancy_, _, _ = lazy_cuml_import_has_dependancy()
          if has_cuml_dependancy_:
              return "cuml"
          has_umap_dependancy_, _, _ = lazy_umap_import_has_dependancy()
          if has_umap_dependancy_:
              return "umap_learn"
  
      raise ValueError(  # noqa
          f'engine expected to be "auto", '
          '"umap_learn", or  "cuml" '
          f"but received: {engine} :: {type(engine)}"
      )
  
imports: import copy
  from time import time
  from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union
  from inspect import getmodule
  import pandas
  from .None import constants
  from .constants import CUML, UMAP_LEARN
  from .feature_utils import FeatureMixin, Literal, XSymbolic, YSymbolic, prune_weighted_edges_df_and_relabel_nodes, resolve_feature_engine
  from .PlotterBase import Plottable, WeakValueDictionary
  from .util import check_set_memoize
  import logging
label_desc: Use image node_id 7 for calling a global function with example usage: resolve_umap_engine(engine) and returns: engine, str, str