docstr: Test threshold condition for peaks.
docstr_tok: ["Test","threshold","condition","for","peaks","."]
code: def test_threshold_condition(self):
      """
      Test threshold condition for peaks.
      """
      x = (0, 2, 1, 4, -1)
      peaks, props = find_peaks(x, threshold=(None, None))
      assert_equal(peaks, np.array([1, 3]))
      assert_equal(props["left_thresholds"], np.array([2, 3]))
      assert_equal(props["right_thresholds"], np.array([1, 5]))
      assert_equal(find_peaks(x, threshold=2)[0], np.array([3]))
      assert_equal(find_peaks(x, threshold=3.5)[0], np.array([]))
      assert_equal(
          find_peaks(x, threshold=(None, 5))[0], np.array([1, 3])
      )
      assert_equal(find_peaks(x, threshold=(None, 4))[0], np.array([1]))
      assert_equal(find_peaks(x, threshold=(2, 4))[0], np.array([]))
  
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 4 for calling the TestFindPeaks obj's underlying member method code with example usage: obj.test_threshold_condition() without return types