code: def test_write_failed():
      f = 40
  
      # Build the initial index
      t = AnnoyIndex(f, "angular")
      t.verbose(True)
      for i in range(1000):
          v = [random.gauss(0, 1) for z in range(f)]
          t.add_item(i, v)
      t.build(10)
  
      if os.name == "nt":
          path = "Z:\\xyz.annoy"
      else:
          path = "/x/y/z.annoy"
      with pytest.raises(Exception):
          t.save(path)
  
imports: import os
  import random
  import pytest
  from annoy import AnnoyIndex
label_desc: Use image node_id 19 for calling a global function with example usage: test_write_failed() without return types