code: def test_before_after(c=BitSet):
      b = c([10, 11, 30, 50, 80])
      assert b.after(0) == 10
      assert b.after(7) == 10
      assert b.after(8) == 10
      assert b.after(10) == 11
      assert b.after(11) == 30
      assert b.after(30) == 50
      assert b.after(33) == 50
      assert b.after(38) == 50
      assert b.after(41) == 50
      assert b.after(42) == 50
      assert b.after(45) == 50
      assert b.after(47) == 50
      assert b.after(50) == 80
      assert b.after(80) is None
  
      assert b.before(0) is None
      assert b.before(99) == 80
      assert b.before(81) == 80
      assert b.before(80) == 50
      assert b.before(50) == 30
      assert b.before(48) == 30
      assert b.before(46) == 30
      assert b.before(45) == 30
      assert b.before(44) == 30
      assert b.before(42) == 30
      assert b.before(38) == 30
      assert b.before(36) == 30
      assert b.before(34) == 30
      assert b.before(33) == 30
      assert b.before(32) == 30
      assert b.before(30) == 11
      assert b.before(11) == 10
      assert b.before(10) is None
  
      b = c([7])
      assert b.after(0) == 7
      b = c([8])
      assert b.after(0) == 8
      b = c([9])
      assert b.after(0) == 9
  
      b = c([7])
      assert b.before(16) == 7
      b = c([8])
      assert b.before(16) == 8
      b = c([9])
      assert b.before(16) == 9
  
      b = c([49])
      assert b.after(0) == 49
  
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 9 for calling a global function with example usage: test_before_after(c) without return types