code: def test_univariate_plots_invalid_input_type_raises_error(
      series_to_plot, plot_func, valid_data_types
  ):
      """Tests whether plots that accept univariate series run without error."""
      if not isinstance(series_to_plot, (pd.Series, pd.DataFrame)):
          series_type = type(series_to_plot)
          match = rf"input must be a one of {valid_data_types}, but found type: {series_type}"
          with pytest.raises(TypeError, match=re.escape(match)):
              plot_func(series_to_plot)
      else:
          match = "input must be univariate, but found 2 variables."
          with pytest.raises(ValueError, match=match):
              plot_func(series_to_plot)
  
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 12 for calling a global function with example usage: test_univariate_plots_invalid_input_type_raises_error(series_to_plot, plot_func, valid_data_types) without return types