code: def testPlateau(self):
      inputSize = 1024
      pos = range(3, 7)
      val = 1.0
      input = [0] * inputSize
      for i in range(len(pos)):
          input[pos[i]] = val
  
      # with interpolation:
      config = {
          "range": inputSize - 1,
          "maxPosition": inputSize,
          "minPosition": 0,
          "orderBy": "amplitude",
          "interpolate": True,
      }
      pdetect = PeakDetection(**config)
      (posis, vals) = pdetect(input)
      self.assertEqualVector(posis, [0.5 * (pos[0] + pos[-1])])
      self.assertEqualVector(vals, [val])
  
      # no interpolation:
      config = {
          "range": inputSize - 1,
          "maxPosition": inputSize,
          "minPosition": 0,
          "orderBy": "amplitude",
          "interpolate": False,
      }
      pdetect = PeakDetection(**config)
  
      (posis, vals) = pdetect(input)
      self.assertEqualVector(posis, [pos[0]])
      self.assertEqualVector(vals, [val])
  
imports: from essentia_test import *
label_desc: Use image node_id 13 for calling the TestPeakDetection obj's underlying member method code with example usage: obj.testPlateau() without return types