code: def test_bad_num_bins(bad_num_bins):
      """Test that exception is raised for bad num bins."""
      X = _make_nested_from_array(
          np.ones(10), n_instances=10, n_columns=1
      )
  
      if not isinstance(bad_num_bins, int):
          with pytest.raises(TypeError):
              HOG1DTransformer(num_bins=bad_num_bins).fit(X).transform(
                  X
              )
      else:
          with pytest.raises(ValueError):
              HOG1DTransformer(num_bins=bad_num_bins).fit(X).transform(
                  X
              )
  
file_path: sktime/sktime/transformations/panel/tests/test_hog1d_transformer.py
imports: import numbers
  import numpy
  import pandas
  import pytest
  from sktime.transformations.panel.hog1d import HOG1DTransformer
  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_num_bins(bad_num_bins) without return types