code: def test_save_load():
      f = 100
      i = AnnoyIndex(f, "hamming")
      u = numpy.random.binomial(1, 0.5, f)
      v = numpy.random.binomial(1, 0.5, f)
      i.add_item(0, u)
      i.add_item(1, v)
      i.build(10)
      i.save("blah.ann")
      j = AnnoyIndex(f, "hamming")
      j.load("blah.ann")
      rs, ds = j.get_nns_by_item(0, 99, include_distances=True)
      assert rs == [0, 1]
      assert ds[0] == pytest.approx(0)
      assert ds[1] == pytest.approx(numpy.dot(u - v, u - v))
  
file_path: annoy/test/hamming_index_test.py
imports: import numpy
  import pytest
  from annoy import AnnoyIndex
label_desc: Use image node_id 3 for calling a global function with example usage: test_save_load() without return types