code: def submatrix(dmat, indices_col, n_neighbors):
      """Return a submatrix given an orginal matrix and the indices to keep.
  
      Parameters
      ----------
      dmat: array, shape (n_samples, n_samples)
          Original matrix.
  
      indices_col: array, shape (n_samples, n_neighbors)
          Indices to keep. Each row consists of the indices of the columns.
  
      n_neighbors: int
          Number of neighbors.
  
      Returns
      -------
      submat: array, shape (n_samples, n_neighbors)
          The corresponding submatrix.
      """
      n_samples_transform, n_samples_fit = dmat.shape
      submat = np.zeros(
          (n_samples_transform, n_neighbors), dtype=dmat.dtype
      )
      for i in numba.prange(n_samples_transform):
          for j in numba.prange(n_neighbors):
              submat[i, j] = dmat[i, indices_col[i, j]]
      return submat
  
file_path: umap/umap/utils.py
imports: import time
  from warnings import warn
  import numpy
  import numba
  from sklearn.utils.validation import check_is_fitted
  import scipy.sparse
label_desc: Use image node_id 5 for calling a global function with example usage: submatrix(dmat, indices_col, n_neighbors) and returns: submat