code: def test_bit_basics(c=BitSet):
      b = c()
      assert not b
      assert 12 not in b
  
      b.update([0, 2, 4, 6, 7])
      assert b
      assert [(n in b) for n in range(10)] == [
          True,
          False,
          True,
          False,
          True,
          False,
          True,
          True,
          False,
          False,
      ]
  
      b.add(9)
      assert 9 in b
      assert len(b) == 6
  
      assert list(b.invert(10)) == [1, 3, 5, 8]
  
      b.discard(6)
      assert list(b) == [0, 2, 4, 7, 9]
      assert len(b) == 5
  
file_path: whoosh/tests/test_bits.py
imports: from whoosh.filedb.filestore import RamStorage
  from whoosh.idsets import BitSet, OnDiskBitSet, SortedIntSet
label_desc: Use image node_id 1 for calling a global function with example usage: test_bit_basics(c) without return types