code: def test_exact_search(rows: int, cols: int, k: int, reordered: bool):
      """
      Test exact search.
  
      :param int rows: The number of rows in the matrix.
      :param int cols: The number of columns in the matrix.
      """
      original = np.random.rand(rows, cols)
      keys = np.arange(rows)
      k = min(k, rows)
  
      if reordered:
          reordered_keys = np.arange(rows)
          np.random.shuffle(reordered_keys)
      else:
          reordered_keys = keys
  
      matches: BatchMatches = search(
          original, original[reordered_keys], k, exact=True
      )
      top_matches = (
          [int(m.keys[0]) for m in matches]
          if rows > 1
          else [int(matches.keys[0])]
      )
      assert top_matches == list(reordered_keys)
  
      matches: Matches = search(original, original[-1], k, exact=True)
      top_match = int(matches.keys[0])
      assert top_match == keys[-1]
  
file_path: usearch/python/scripts/test_tooling.py
imports: import os
  import pytest
  import numpy
  from usearch.io import load_matrix, save_matrix
  from usearch.index import search
  from usearch.eval import random_vectors
  from usearch.index import Match, Matches, BatchMatches, Index, Indexes
label_desc: Use image node_id 3 for calling a global function with example usage: test_exact_search(rows, cols, k, reordered) without return types