code: def test_valid_boundary():
      x = [0, 0, 1, 0, 1, 1, 0, 1]
      assert not utils.valid_boundary(x, True)
      assert not utils.valid_boundary([0])
      assert utils.valid_boundary(x, False)
      x = [0, 0, 1, 0, 1, 1, 0, 1, 1]
      assert utils.valid_boundary(x, True)
  
imports: import numpy
  import mmocr.utils
label_desc: Use image node_id 5 for calling a global function with example usage: test_valid_boundary() without return types