code: def grouping(values):
      import numpy as np
  
      diff = np.concatenate(([1], np.diff(values)))
      idx = np.concatenate((np.where(diff)[0], [len(values)]))
      return values[idx[:-1]], np.diff(idx)
  
label_desc: Use image node_id 1 for calling a global function with example usage: grouping(values) and returns: values,  np