code: def test_ivfpq_pred(
      nrows, ncols, n_neighbors, nlist, M, n_bits, usePrecomputedTables
  ):
      if ncols == 512:
          pytest.skip("https://github.com/rapidsai/cuml/issues/5603")
      algo_params = {
          "nlist": nlist,
          "nprobe": int(nlist * 0.2),
          "M": M,
          "n_bits": n_bits,
          "usePrecomputedTables": usePrecomputedTables,
      }
  
      X, y = make_blobs(
          n_samples=nrows, centers=5, n_features=ncols, random_state=0
      )
  
      knn_cu = cuKNN(algorithm="ivfpq", algo_params=algo_params)
      knn_cu.fit(X)
  
      neigh_ind = knn_cu.kneighbors(
          X, n_neighbors=n_neighbors, return_distance=False
      )
  
      del knn_cu
      gc.collect()
  
      labels, probs = predict(neigh_ind, y, n_neighbors)
      assert array_equal(labels, y)
  
imports: import gc
  from cuml.common import has_scipy
  import cuml
  import sklearn
  from cuml.internals.safe_imports import cpu_only_import_from
  from numpy.testing import assert_array_equal, assert_allclose
  from cuml.internals.safe_imports import cpu_only_import
  import pytest
  import math
  from cuml.testing.utils import array_equal, unit_param, quality_param, stress_param
  from cuml.neighbors import NearestNeighbors
  from sklearn.neighbors import NearestNeighbors
  from cuml.datasets import make_blobs
  from sklearn.metrics import pairwise_distances
  from cuml.metrics import pairwise_distances
  from cuml.internals import logger
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 8 for calling a global function with example usage: test_ivfpq_pred(nrows, ncols, n_neighbors, nlist, M, n_bits, usePrecomputedTables) without return types