code: def test_return_categorical(calendar):
      """Tests return_categorical param."""
      X = pd.DataFrame(
          {"values": np.arange(1, 6)},
          index=pd.date_range("2022-05-01", periods=5, freq="D"),
      )
      trafo_ctg = HolidayFeatures(
          calendar=calendar,
          return_categorical=True,
          return_dummies=False,
      )
      X_trafo_ctg = trafo_ctg.fit_transform(X)
      expected_ctg = pd.DataFrame(
          {
              "holiday": pd.Categorical(
                  [
                      "no_holiday",
                      "May Day",
                      "no_holiday",
                      "no_holiday",
                      "no_holiday",
                  ]
              )
          },
          index=X.index,
      )
      assert_frame_equal(X_trafo_ctg, expected_ctg)
  
file_path: sktime/sktime/transformations/series/holiday/tests/test_holidays.py
imports: import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from sktime.transformations.series.holiday._holidayfeats import HolidayFeatures
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 3 for calling a global function with example usage: test_return_categorical(calendar) without return types