docstr: Test width condition for peaks.
code: def test_width_condition(self):
      """
      Test width condition for peaks.
      """
      x = np.array([1, 0, 1, 2, 1, 0, -1, 4, 0])
      peaks, props = find_peaks(x, width=(None, 2), rel_height=0.75)
      assert_equal(peaks.size, 1)
      assert_equal(peaks, 7)
      assert_allclose(props["widths"], 1.35)
      assert_allclose(props["width_heights"], 1.0)
      assert_allclose(props["left_ips"], 6.4)
      assert_allclose(props["right_ips"], 7.75)
  
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._peak_finding_utils import _local_maxima_1d, PeakPropertyWarning
label_desc: Use image node_id 7 for calling the TestFindPeaks obj's underlying member method code with example usage: obj.test_width_condition() without return types