code: def test_bad_input_args(bad_num_intervals):
      """Test that exception is raised for bad num levels."""
      X = _make_nested_from_array(
          np.ones(10), n_instances=10, n_columns=1
      )
  
      if not isinstance(bad_num_intervals, int):
          with pytest.raises(TypeError):
              SlopeTransformer(num_intervals=bad_num_intervals).fit(
                  X
              ).transform(X)
      else:
          with pytest.raises(ValueError):
              SlopeTransformer(num_intervals=bad_num_intervals).fit(
                  X
              ).transform(X)
  
file_path: sktime/sktime/transformations/panel/tests/test_slope_transformer.py
imports: import math
  import numpy
  import pandas
  import pytest
  from sktime.transformations.panel.slope import SlopeTransformer
  from sktime.utils._testing.panel import _make_nested_from_array
label_desc: Use image node_id 1 for calling a global function with example usage: test_bad_input_args(bad_num_intervals) without return types