code: def test_ranges():
      rs = ranges()
      assert len(rs) == 0
  
      rs.resize(5)
      assert len(rs) == 5
      for r in rs:
          assert r.begin == 0
          assert r.end == 0
  
      rs.clear()
      assert len(rs) == 0
  
      rs.extend([range(1, 2), range(3, 4)])
      assert rs[0].begin == 1
      assert rs[0].end == 2
      assert rs[1].begin == 3
      assert rs[1].end == 4
  
      ser = pickle.dumps(rs, 2)
      deser = pickle.loads(ser)
      assert rs == deser
  
imports: from dlib import range, ranges, rangess
  from pytest import raises
label_desc: Use image node_id 4 for calling a global function with example usage: test_ranges() without return types