code: def test_bad_features(bad_features):
      """Test that ValueError is raised for bad features."""
      X, y = make_classification_problem()
      with pytest.raises(ValueError):
          RandomIntervalFeatureExtractor(n_intervals=bad_features).fit(
              X
          )
  
file_path: sktime/sktime/transformations/panel/summarize/tests/test_RandomIntervalFeatureExtractor.py
imports: import numpy
  import pandas
  import pytest
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import FunctionTransformer
  from sktime.transformations.compose import FeatureUnion
  from sktime.transformations.panel.reduce import Tabularizer
  from sktime.transformations.panel.segment import RandomIntervalSegmenter
  from sktime.transformations.panel.summarize import RandomIntervalFeatureExtractor
  from sktime.utils._testing.panel import _make_nested_from_array, make_classification_problem
  from sktime.utils.slope_and_trend import _slope
label_desc: Use image node_id 3 for calling a global function with example usage: test_bad_features(bad_features) without return types