docstr: Test equivalence between setting
  1. param_name_2 = value with ParameterSpace
  2. pass in a SearchParameters with param_name = value
code: def do_test_with_param(self, index_key, ps_params, params):
      """
      Test equivalence between setting
      1. param_name_2 = value with ParameterSpace
      2. pass in a SearchParameters with param_name = value
      """
      ds = datasets.SyntheticDataset(32, 1000, 100, 20)
      index = faiss.index_factory(ds.d, index_key)
      if index_key.startswith("PQ"):
          index.polysemous_training.n_iter = 50000
          index.polysemous_training.n_redo = 1
      index.train(ds.get_train())
      index.add(ds.get_database())
  
      I0, D0 = index.search(ds.get_queries(), 10)
  
      Dnew, Inew = index.search(ds.get_queries(), 10, params=params)
  
      # make sure rhe parameter does indeed change the result...
      self.assertFalse(np.all(Inew == I0))
  
      for param_name, value in ps_params.items():
          faiss.ParameterSpace().set_index_parameter(
              index, param_name, value
          )
      Dref, Iref = index.search(ds.get_queries(), 10)
  
      np.testing.assert_array_equal(Iref, Inew)
      np.testing.assert_array_equal(Dref, Dnew)
  
imports: import numpy
  import faiss
  import unittest
  import sys
  import gc
  from faiss.contrib import datasets
  from faiss.contrib.evaluation import sort_range_res_2, check_ref_range_results
label_desc: Use image node_id 1 for calling the TestSearchParams obj's underlying member method code with example usage: obj.do_test_with_param(index_key, ps_params, params) without return types