code: def test_updates():
      schema = fields.Schema(id=fields.ID(unique=True, stored=True))
      ix = RamStorage().create_index(schema)
      for _ in xrange(10):
          with ix.writer() as w:
              w.update_document(id="a")
      assert ix.doc_count() == 1
  
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 4 for calling a global function with example usage: test_updates() without return types