code: def dbscan_predict(X: pd.DataFrame, model: Any):
      """
      DBSCAN has no predict per se, so we reverse engineer one here
      from https://stackoverflow.com/questions/27822752/scikit-learn-predicting-new-points-with-dbscan
  
      """
      n_samples = X.shape[0]
  
      y_new = np.ones(shape=n_samples, dtype=int) * -1
  
      for i in range(n_samples):
          diff = (
              model.components_ - X.iloc[i, :].values
          )  # NumPy broadcasting
  
          dist = np.linalg.norm(diff, axis=1)  # Euclidean distance
  
          shortest_dist_idx = np.argmin(dist)
  
          if dist[shortest_dist_idx] < model.eps:
              y_new[i] = model.labels_[
                  model.core_sample_indices_[shortest_dist_idx]
              ]
  
      return y_new
  
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 7 for calling a global function with example usage: dbscan_predict(X, model) and returns: y_new