code: def _validate_ijv(ijv):
      """
      'ijv' is another, more constrained, sparse representation
  
      It is a 2-dimensional array of triplets, of shape: (num_coords, 3)
      It also allows for overlapping labels
  
      Unlike 'sparse', it is strictly an ndarray with a single dtype
      for all values, and is strictly in triplet form, where
      [i, j, v] = [y_coord, x_coord, label_value]
      It cannot host values for 'c', 't' or 'z'
  
      e.g. this 'sparse' record:
      rec.array([(0, 0, 0, 1), (0, 1, 0, 1), (0, 1, 0, 2), (0, 1, 1, 2),],
               dtype=[('z', '<u2'), ('y', '<u2'), ('x', '<u2'), ('label', 'u1')])
  
      would equate to this 'ijv' matrix:
      array([[0, 0, 1],
             [1, 0, 1],
             [1, 0, 2],
             [1, 1, 2]],
            dtype=uint16)
      """
      assert type(ijv) == np.ndarray, "ijv must be ndarray"
      assert ijv.ndim == 2, "ijv must be 2-dimensional"
      assert ijv.shape[1] == 3, "ijv must have 3 columns"
  
imports: from enum import Enum
  import numpy
  from numpy.random.mtrand import RandomState
  import scipy.sparse
  import centrosome.index
label_desc: Use image node_id 5 for calling a global function with example usage: _validate_ijv(ijv) without return types