code: def areas_from_ijv(ijv, indices=None, validate=True):
      """
      The area of each object in an 'ijv' formatted label matrix
  
      Because of the discrete nature of the matrix, this is simply equal to the
      occurrence count of each label in the matrix
      """
      if validate:
          _validate_ijv(ijv)
  
      if indices is None:
          indices = indices_from_ijv(ijv, validate=False)
  
      if len(indices) == 0:
          return np.zeros(0, int)
  
      return np.bincount(ijv[:, 2])[indices]
  
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 10 for calling a global function with example usage: areas_from_ijv(ijv, indices, validate) and returns: np, np