code: def test_get_nns_by_item():
      f = 2
      i = AnnoyIndex(f, "dot")
      i.add_item(0, [2, 2])
      i.add_item(1, [3, 2])
      i.add_item(2, [3, 3])
      i.build(10)
  
      assert i.get_nns_by_item(0, 3) == [2, 1, 0]
      assert i.get_nns_by_item(2, 3) == [2, 1, 0]
  
file_path: annoy/test/dot_index_test.py
imports: import random
  import numpy
  import pytest
  from annoy import AnnoyIndex
label_desc: Use image node_id 4 for calling a global function with example usage: test_get_nns_by_item() without return types