code: def test_plot_series_invalid_label_kwarg_len_raises_error(
      series_to_plot,
  ):
      """Tests whether plot_series raises error for inconsistent series/labels."""
      match = """There must be one label for each time series,
                  but found inconsistent numbers of series and
                  labels."""
      with pytest.raises(ValueError, match=match):
          # Generate error by creating list of labels with length that does
          # not match input number of input series
          if isinstance(series_to_plot, pd.Series):
              labels = ["Series 1", "Series 2"]
          elif isinstance(series_to_plot, tuple):
              labels = [
                  f"Series {i}" for i in range(len(series_to_plot) - 1)
              ]
  
          _plot_series(series_to_plot, labels=labels)
  
imports: import re
  import numpy
  import pandas
  import pytest
  from sktime.datasets import load_airline
  from sktime.tests.test_switch import run_test_for_class
  from sktime.utils.plotting import plot_correlations, plot_lags, plot_series
  from sktime.utils.validation._dependencies import _check_soft_dependencies
  from sktime.utils.validation.series import VALID_DATA_TYPES
label_desc: Use image node_id 7 for calling a global function with example usage: test_plot_series_invalid_label_kwarg_len_raises_error(series_to_plot) without return types