code: def test_bad_input_args(bad_interval):
      """Check that exception is raised for bad input args."""
      X = _make_nested_from_array(
          np.ones(10), n_instances=10, n_columns=2
      )
      with pytest.raises(ValueError):
          RandomIntervalSegmenter(n_intervals=bad_interval).fit(X)
  
file_path: sktime/sktime/transformations/panel/tests/test_segment.py
imports: import numpy
  import pandas
  import pytest
  from sktime.transformations.panel.segment import RandomIntervalSegmenter, _rand_intervals_fixed_n, _rand_intervals_rand_n
  from sktime.utils._testing.panel import _make_nested_from_array
label_desc: Use image node_id 2 for calling a global function with example usage: test_bad_input_args(bad_interval) without return types