code: def test_random_holes():
      f = 10
      index = AnnoyIndex(f, "angular")
      valid_indices = random.sample(range(2000), 1000)  # leave holes
      for i in valid_indices:
          v = numpy.random.normal(size=(f,))
          index.add_item(i, v)
      index.build(10)
      for i in valid_indices:
          js = index.get_nns_by_item(i, 10000)
          for j in js:
              assert j in valid_indices
      for i in range(1000):
          v = numpy.random.normal(size=(f,))
          js = index.get_nns_by_vector(v, 10000)
          for j in js:
              assert j in valid_indices
  
file_path: annoy/test/holes_test.py
imports: import random
  import numpy
  from annoy import AnnoyIndex
label_desc: Use image node_id 1 for calling a global function with example usage: test_random_holes() without return types