docstr: Test prominence condition for peaks.
docstr_tok: ["Test","prominence","condition","for","peaks","."]
code: def test_prominence_condition(self):
      """
      Test prominence condition for peaks.
      """
      x = np.linspace(0, 10, 100)
      peaks_true = np.arange(1, 99, 2)
      offset = np.linspace(1, 10, peaks_true.size)
      x[peaks_true] += offset
      prominences = x[peaks_true] - x[peaks_true + 1]
      interval = (3, 9)
      keep = np.nonzero(
          (interval[0] <= prominences) & (prominences <= interval[1])
      )
  
      peaks_calc, properties = find_peaks(x, prominence=interval)
      assert_equal(peaks_calc, peaks_true[keep])
      assert_equal(properties["prominences"], prominences[keep])
      assert_equal(properties["left_bases"], 0)
      assert_equal(properties["right_bases"], peaks_true[keep] + 1)
  
imports: import copy
  import numpy
  from numpy.testing import assert_, assert_equal, assert_allclose, assert_array_equal
  import pytest
  from pytest import raises, warns
  from scipy.signal._peak_finding import argrelmax, argrelmin, peak_prominences, peak_widths, _unpack_condition_args, find_peaks, find_peaks_cwt, _identify_ridge_lines
  from scipy.signal.windows import gaussian
  from scipy.signal._peak_finding_utils import _local_maxima_1d, PeakPropertyWarning
label_desc: Use image node_id 6 for calling the TestFindPeaks obj's underlying member method code with example usage: obj.test_prominence_condition() without return types