code: def volume_change_correlation(results, references):
      r"""
      Volume change correlation.
  
      Computes the linear correlation of change in binary object volume between
      the contents of the successive binary images supplied. Measured through
      the Pearson product-moment correlation coefficient.
  
      Parameters
      ----------
      results : sequence of array_like
          Ordered list of input data containing objects. Each array_like will be
          converted into binary: background where 0, object everywhere else.
      references : sequence of array_like
          Ordered list of input data containing objects. Each array_like will be
          converted into binary: background where 0, object everywhere else.
          The order must be the same as for ``results``.
  
      Returns
      -------
      r : float
          The correlation coefficient between -1 and 1.
      p : float
          The two-side p value.
  
      """
      results = numpy.atleast_2d(
          numpy.array(results).astype(numpy.bool_)
      )
      references = numpy.atleast_2d(
          numpy.array(references).astype(numpy.bool_)
      )
  
      results_volumes = numpy.asarray(
          [numpy.count_nonzero(r) for r in results]
      )
      references_volumes = numpy.asarray(
          [numpy.count_nonzero(r) for r in references]
      )
  
      results_volumes_changes = (
          results_volumes[1:] - results_volumes[:-1]
      )
      references_volumes_changes = (
          references_volumes[1:] - references_volumes[:-1]
      )
  
      return pearsonr(
          results_volumes_changes, references_volumes_changes
      )
  
imports: import numpy
  from scipy.ndimage import _ni_support
  from scipy.ndimage import distance_transform_edt, binary_erosion, generate_binary_structure
  from scipy.ndimage import label, find_objects
  from scipy.stats import pearsonr
label_desc: Use image node_id 16 for calling a global function with example usage: volume_change_correlation(results, references) and returns: pearsonr