docstr: Test case: two time series, a full sine wave series and a sine wave series
  with some irregularities every other period. Only models which use categorical
  static covariates should be able to recognize the underlying curve type when input for prediction is only a
  sine wave
  See the test case in section 6 from
  https://github.com/unit8co/darts/blob/master/examples/15-static-covariates.ipynb
code: def test_quality_forecast_with_categorical_covariates(self):
      """Test case: two time series, a full sine wave series and a sine wave series
      with some irregularities every other period. Only models which use categorical
      static covariates should be able to recognize the underlying curve type when input for prediction is only a
      sine wave
      See the test case in section 6 from
      https://github.com/unit8co/darts/blob/master/examples/15-static-covariates.ipynb
  
      """
      # full sine wave series
      period = 20
      sine_series = tg.sine_timeseries(
          length=4 * period,
          value_frequency=1 / period,
          column_name="smooth",
          freq="h",
      ).with_static_covariates(pd.DataFrame(data={"curve_type": [1]}))
  
      # irregular sine wave series with linear ramp every other period
      sine_vals = sine_series.values()
      linear_vals = np.expand_dims(np.linspace(1, -1, num=19), -1)
      sine_vals[21:40] = linear_vals
      sine_vals[61:80] = linear_vals
      irregular_series = TimeSeries.from_times_and_values(
          values=sine_vals,
          times=sine_series.time_index,
          columns=["irregular"],
      ).with_static_covariates(pd.DataFrame(data={"curve_type": [0]}))
  
      def fit_predict(model, train_series, predict_series):
          """perform model training and prediction"""
          model.fit(train_series)
          return model.predict(n=int(period / 2), series=predict_series)
  
      def get_model_params():
          """generate model parameters"""
          return {
              "lags": int(period / 2),
              "output_chunk_length": int(period / 2),
          }
  
      # test case without using categorical static covariates
      train_series_no_cat = [
          sine_series.with_static_covariates(None),
          irregular_series.with_static_covariates(None),
      ]
      # test case using categorical static covariates
      train_series_cat = [sine_series, irregular_series]
      for model_no_cat, model_cat in zip(
          [LightGBMModel(**get_model_params())],
          [
              LightGBMModel(
                  categorical_static_covariates=["curve_type"],
                  **get_model_params(),
              ),
          ],
      ):
          preds_no_cat = fit_predict(
              model_no_cat,
              train_series_no_cat,
              predict_series=[
                  series[:60] for series in train_series_no_cat
              ],
          )
          preds_cat = fit_predict(
              model_cat,
              train_series_cat,
              predict_series=[
                  series[:60] for series in train_series_cat
              ],
          )
  
          # categorical covariates make model aware of the underlying curve type -> improves rmse
          rmses_no_cat = rmse(train_series_cat, preds_no_cat)
          rmses_cat = rmse(train_series_cat, preds_cat)
          assert all(
              [
                  rmse_no_cat > rmse_cat
                  for rmse_no_cat, rmse_cat in zip(
                      rmses_no_cat, rmses_cat
                  )
              ]
          )
  
imports: import copy
  import functools
  import itertools
  import math
  from unittest.mock import patch
  import numpy
  import pandas
  import pytest
  from sklearn.ensemble import HistGradientBoostingRegressor, RandomForestRegressor
  from sklearn.linear_model import LinearRegression
  import darts
  from darts import TimeSeries
  from darts.dataprocessing.encoders import FutureCyclicEncoder, PastDatetimeAttributeEncoder
  from darts.logging import get_logger
  from darts.metrics import mae, rmse
  from darts.models import CatBoostModel, LightGBMModel, LinearRegressionModel, NotImportedModule, RandomForest, RegressionModel, XGBModel
  from darts.utils import timeseries_generation
  from darts.utils.multioutput import MultiOutputRegressor
label_desc: Use image node_id 31 for calling the TestRegressionModels obj's underlying member method code with example usage: obj.test_quality_forecast_with_categorical_covariates() and returns: model, dict