code: def _nhood_compare(indices_left, indices_right):
      """Compute Jaccard index of two neighborhoods"""
      result = np.empty(indices_left.shape[0])
  
      for i in range(indices_left.shape[0]):
          intersection_size = np.intersect1d(
              indices_left[i], indices_right[i], assume_unique=True
          ).shape[0]
          union_size = np.unique(
              np.hstack([indices_left[i], indices_right[i]])
          ).shape[0]
          result[i] = float(intersection_size) / float(union_size)
  
      return result
  
imports: import numpy
  import numba
  from warnings import warn
  import sklearn.decomposition
  import sklearn.cluster
  import sklearn.neighbors
  from matplotlib.patches import Patch
  from umap.utils import submatrix, average_nn_distance
  from bokeh.plotting import show
  from bokeh.plotting import output_file, output_notebook
  from bokeh.layouts import column
  from bokeh.models import CustomJS, TextInput
  from matplotlib.pyplot import show
  from warnings import warn
label_desc: Use image node_id 10 for calling a global function with example usage: _nhood_compare(indices_left, indices_right) and returns: result