code: def peaks(samples):
      """Find the minimum and maximum peak of the samples.
      Returns that pair in the order they were found.
      So if min was found first, it returns (min, max) else the other way around.
      """
      max_index = numpy.argmax(samples)
      max_value = samples[max_index]
  
      min_index = numpy.argmin(samples)
      min_value = samples[min_index]
  
      if min_index < max_index:
          return (min_value, max_value)
      else:
          return (max_value, min_value)
  
file_path: TimeSide/timeside/plugins/grapher/utils.py
imports: import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: peaks(samples) and returns: min_value,  max_value, max_value,  min_value