code: def test_load_save():
      # Issue #61
      i = AnnoyIndex(10, "angular")
      i.load("test/test.tree")
      u = i.get_item_vector(99)
      i.save("i.tree")
      v = i.get_item_vector(99)
      assert u == v
      j = AnnoyIndex(10, "angular")
      j.load("test/test.tree")
      w = i.get_item_vector(99)
      assert u == w
      # Ensure specifying if prefault is allowed does not impact result
      j.save("j.tree", True)
      k = AnnoyIndex(10, "angular")
      k.load("j.tree", True)
      x = k.get_item_vector(99)
      assert u == x
      k.save("k.tree", False)
      l = AnnoyIndex(10, "angular")
      l.load("k.tree", False)
      y = l.get_item_vector(99)
      assert u == y
  
imports: import os
  import random
  import pytest
  from annoy import AnnoyIndex
label_desc: Use image node_id 7 for calling a global function with example usage: test_load_save() without return types