code: def calculate_solidity(labels,indexes=None):
      
      if indexes is not None:
          """ Convert to compat 32bit integer """
          indexes = np.array(indexes,dtype=np.int32)
      areas = scind.sum(np.ones(labels.shape),labels,indexes)
      convex_hull_areas = calculate_convex_hull_areas(labels, indexes)
      return areas / convex_hull_areas
docs: Calculate the area of each label divided by the area of its convex hull
      
      labels - a label matrix
      indexes - the indexes of the labels to measure