docstr: Test with mismatching peak and / or prominence data.
code: def test_mismatching_prominence_data(self):
      """Test with mismatching peak and / or prominence data."""
      x = [0, 1, 0]
      peak = [1]
      for i, (prominences, left_bases, right_bases) in enumerate(
          [
              ((1.0,), (-1,), (2,)),  # left base not in x
              ((1.0,), (0,), (3,)),  # right base not in x
              ((1.0,), (2,), (0,)),  # swapped bases same as peak
              (
                  (1.0, 1.0),
                  (0, 0),
                  (2, 2),
              ),  # array shapes don't match peaks
              ((1.0, 1.0), (0,), (2,)),  # arrays with different shapes
              ((1.0,), (0, 0), (2,)),  # arrays with different shapes
              ((1.0,), (0,), (2, 2)),  # arrays with different shapes
          ]
      ):
          # Make sure input is matches output of signal.peak_prominences
          prominence_data = (
              np.array(prominences, dtype=np.float64),
              np.array(left_bases, dtype=np.intp),
              np.array(right_bases, dtype=np.intp),
          )
          # Test for correct exception
          if i < 3:
              match = "prominence data is invalid for peak"
          else:
              match = (
                  "arrays in `prominence_data` must have the same shape"
              )
          with raises(ValueError, match=match):
              peak_widths(x, peak, prominence_data=prominence_data)
  
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 6 for calling the TestPeakWidths obj's underlying member method code with example usage: obj.test_mismatching_prominence_data() without return types