code: def testMinPeakDistanceSorting(self):
      # Test the sorting options when appliying
      # some minimum peak distance
  
      peak1, peak2, peak3 = 1, 3, 5
  
      input = [0] * 6
      input[peak1] = 4.0
      input[peak2] = 1.0
      input[peak3] = 5.0
  
      inputSize = len(input)
  
      peakDetection = PeakDetection()
  
      # case 1: ordered by magnitude
      config = {
          "range": inputSize - 1,
          "maxPosition": inputSize - 1,
          "orderBy": "amplitude",
          "minPeakDistance": 3.0,
          "interpolate": False,
      }
  
      peakDetection.configure(**config)
      (posis, vals) = peakDetection(input)
  
      self.assertEqualVector(posis, [peak3, peak1])
      self.assertEqualVector(vals, [5.0, 4.0])
  
      # case 1: ordered by position
      config = {
          "range": inputSize - 1,
          "maxPosition": inputSize - 1,
          "orderBy": "position",
          "minPeakDistance": 3.0,
          "interpolate": False,
      }
  
      peakDetection.configure(**config)
      (posis, vals) = peakDetection(input)
  
      self.assertEqualVector(posis, [peak1, peak3])
      self.assertEqualVector(vals, [4.0, 5.0])
  
imports: from essentia_test import *
label_desc: Use image node_id 20 for calling the TestPeakDetection obj's underlying member method code with example usage: obj.testMinPeakDistanceSorting() without return types