docstr: DBSCAN clustering on cpu or gpu infered by .engine flag
          
docstr_tok: ["DBSCAN","clustering","on","cpu","or","gpu","infered","by",".engine","flag"]
code: def _cluster_dbscan(
      self,
      res,
      kind,
      cols,
      fit_umap_embedding,
      target,
      min_dist,
      min_samples,
      engine_dbscan,
      verbose,
      *args,
      **kwargs,
  ):
      """DBSCAN clustering on cpu or gpu infered by .engine flag"""
      _, DBSCAN, _, cuDBSCAN = lazy_dbscan_import_has_dependency()
  
      if engine_dbscan in [CUML]:
          print(
              "`g.transform_dbscan(..)` not supported for engine=cuml, will return `g.transform_umap(..)` instead"
          )
  
      res.engine_dbscan = engine_dbscan  # resolve_cpu_gpu_engine(engine_dbscan)  # resolve_cpu_gpu_engine("auto")
      res._dbscan_params = ModelDict(
          "latest DBSCAN params",
          kind=kind,
          cols=cols,
          target=target,
          fit_umap_embedding=fit_umap_embedding,
          min_dist=min_dist,
          min_samples=min_samples,
          engine_dbscan=engine_dbscan,
          verbose=verbose,
      )
  
      dbscan = (
          cuDBSCAN(
              eps=min_dist, min_samples=min_samples, *args, **kwargs
          )
          if res.engine_dbscan == CUML
          else DBSCAN(
              eps=min_dist, min_samples=min_samples, *args, **kwargs
          )
      )
      # print('dbscan:', dbscan)
  
      res = dbscan_fit(
          res,
          dbscan,
          kind=kind,
          cols=cols,
          use_umap_embedding=fit_umap_embedding,
          verbose=verbose,
      )
  
      return res
  
imports: import logging
  import pandas
  import numpy
  from typing import Any, List, Union, TYPE_CHECKING, Tuple, Optional
  from typing_extensions import Literal
  from collections import Counter
  from graphistry.Plottable import Plottable
  from graphistry.constants import CUML, UMAP_LEARN, DBSCAN
  from graphistry.features import ModelDict
  from graphistry.feature_utils import get_matrix_by_column_parts
label_desc: Use image node_id 2 for calling the ClusterMixin obj's underlying member method code with example usage: obj._cluster_dbscan(res, kind, cols, fit_umap_embedding, target, min_dist, min_samples, engine_dbscan, verbose) and returns: res