code: def bench_speed(
      eval: Evaluation,
      connectivity: int = DEFAULT_CONNECTIVITY,
      expansion_add: int = DEFAULT_EXPANSION_ADD,
      expansion_search: int = DEFAULT_EXPANSION_SEARCH,
      jit: bool = False,
      train: bool = False,
  ) -> pd.DataFrame:
      # Build various indexes:
      indexes = []
      jit_options = [False, True] if jit else [False]
      dtype_options = [ScalarKind.F32, ScalarKind.F16, ScalarKind.I8]
      for jit, dtype in itertools.product(jit_options, dtype_options):
          metric = MetricKind.IP
          if jit:
              metric = njit(eval.ndim, metric, dtype)
          index = Index(
              ndim=eval.ndim,
              metric=metric,
              dtype=dtype,
              expansion_add=expansion_add,
              expansion_search=expansion_search,
              connectivity=connectivity,
              path="USearch" + ["", "+JIT"][jit] + ":" + str(dtype),
          )
  
          # Skip the cases, where JIT-ing is impossible
          if jit and not index.jit:
              continue
          indexes.append(index)
  
      # Add FAISS indexes to the mix:
      try:
          from index_faiss import IndexFAISS, IndexQuantizedFAISS
  
          indexes.append(
              IndexFAISS(
                  ndim=eval.ndim,
                  expansion_add=expansion_add,
                  expansion_search=expansion_search,
                  connectivity=connectivity,
                  path="FAISS:f32",
              )
          )
          if train:
              indexes.append(
                  IndexQuantizedFAISS(
                      train=eval.tasks[0].vectors,
                      expansion_add=expansion_add,
                      expansion_search=expansion_search,
                      connectivity=connectivity,
                      path="FAISS+IVFPQ:f32",
                  )
              )
      except (ImportError, ModuleNotFoundError):
          pass
  
      # Time to evaluate:
      results = [eval(index) for index in indexes]
      return pd.DataFrame(
          {
              "names": [i.path for i in indexes],
              "add_per_second": [x["add_per_second"] for x in results],
              "search_per_second": [
                  x["search_per_second"] for x in results
              ],
              "recall_at_one": [x["recall_at_one"] for x in results],
          }
      )
  
file_path: usearch/python/scripts/bench.py
imports: import itertools
  from typing import List
  from dataclasses import asdict
  import numpy
  import pandas
  from usearch.index import Index, Key, MetricKind, ScalarKind
  from usearch.numba import jit
  from usearch.eval import Evaluation, AddTask
  from usearch.index import DEFAULT_CONNECTIVITY, DEFAULT_EXPANSION_ADD, DEFAULT_EXPANSION_SEARCH
label_desc: Use image node_id 1 for calling a global function with example usage: bench_speed(eval, connectivity, expansion_add, expansion_search, jit, train) and returns: pd