code: def test_single_vector():
      # https://github.com/spotify/annoy/issues/194
      a = AnnoyIndex(3, "angular")
      a.add_item(0, [1, 0, 0])
      a.build(10)
      a.save("1.ann")
      indices, dists = a.get_nns_by_vector(
          [1, 0, 0], 3, include_distances=True
      )
      assert indices == [0]
      assert dists[0] ** 2 == pytest.approx(0.0)
  
imports: import random
  import numpy
  import pytest
  from annoy import AnnoyIndex
label_desc: Use image node_id 20 for calling a global function with example usage: test_single_vector() without return types