docstr: Test a simple use case with easy to verify results at different relative
  heights.
code: def test_basic(self):
      """
      Test a simple use case with easy to verify results at different relative
      heights.
      """
      x = np.array([1, 0, 1, 2, 1, 0, -1])
      prominence = 2
      for rel_height, width_true, lip_true, rip_true in [
          (0.0, 0.0, 3.0, 3.0),  # raises warning
          (0.25, 1.0, 2.5, 3.5),
          (0.5, 2.0, 2.0, 4.0),
          (0.75, 3.0, 1.5, 4.5),
          (1.0, 4.0, 1.0, 5.0),
          (2.0, 5.0, 1.0, 6.0),
          (3.0, 5.0, 1.0, 6.0),
      ]:
          width_calc, height, lip_calc, rip_calc = peak_widths(
              x, [3], rel_height
          )
          assert_allclose(width_calc, width_true)
          assert_allclose(height, 2 - rel_height * prominence)
          assert_allclose(lip_calc, lip_true)
          assert_allclose(rip_calc, rip_true)
  
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 2 for calling the TestPeakWidths obj's underlying member method code with example usage: obj.test_basic() without return types