code: def test_threads():
      n, f = 10000, 10
      i = AnnoyIndex(f, "euclidean")
      for j in range(n):
          i.add_item(j, numpy.random.normal(size=f))
      i.build(10)
  
      pool = multiprocessing.pool.ThreadPool()
  
      def query_f(j):
          i.get_nns_by_item(1, 1000)
  
      pool.map(query_f, range(n))
  
imports: import multiprocessing.pool
  import numpy
  from annoy import AnnoyIndex
label_desc: Use image node_id 1 for calling a global function with example usage: test_threads() without return types