code: def test_delete_nonexistant():
      from whoosh.writing import IndexingError
  
      schema = fields.Schema(id=fields.ID(stored=True))
      # Single segment
      with TempIndex(schema, "deletenon1") as ix:
          w = ix.writer()
          for char in "ABC":
              w.add_document(id=char)
          w.commit()
  
          try:
              w = ix.writer()
              with pytest.raises(IndexingError):
                  w.delete_document(5)
          finally:
              w.cancel()
  
      # Multiple segments
      with TempIndex(schema, "deletenon1") as ix:
          for char in "ABC":
              w = ix.writer()
              w.add_document(id=char)
              w.commit(merge=False)
  
          try:
              w = ix.writer()
              with pytest.raises(IndexingError):
                  w.delete_document(5)
          finally:
              w.cancel()
  
imports: from __future__ import with_statement
  import random, time, threading
  import pytest
  from whoosh import analysis, fields, query, writing
  from whoosh.compat import b, u, xrange, text_type
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 11 for calling a global function with example usage: test_delete_nonexistant() without return types