docstr: check that the parameters provided in predict_kwargs are correctly processed
code: def test_predict_kwargs(self, model_type, enable_optimization):
      """check that the parameters provided in predict_kwargs are correctly processed"""
      invalid_predict_kwargs = {"predict_likelihood_parameters": False}
      unsupported_predict_kwargs = {"unsupported": "unsupported"}
      if model_type == "regression":
          valid_predict_kwargs = {}
      else:
          valid_predict_kwargs = {"batch_size": 10}
  
      n = 2
      model = self.create_model(1, use_ll=False, model_type=model_type)
  
      # torch not available
      if model is None:
          return
  
      model.fit(series=self.ts_pass_train[:-n])
  
      # supported argument
      hist_fc = model.historical_forecasts(
          self.ts_pass_train,
          forecast_horizon=1,
          start=len(self.ts_pass_train) - n,
          retrain=False,
          enable_optimization=enable_optimization,
          predict_kwargs=valid_predict_kwargs,
      )
  
      assert hist_fc.components.equals(self.ts_pass_train.components)
      assert len(hist_fc) == n
  
      # passing unsupported prediction argument
      with pytest.raises(TypeError):
          hist_fc = model.historical_forecasts(
              self.ts_pass_train,
              forecast_horizon=1,
              start=len(self.ts_pass_train) - n,
              retrain=False,
              enable_optimization=enable_optimization,
              predict_kwargs=unsupported_predict_kwargs,
          )
  
      # passing hist_fc parameters in predict_kwargs, interfering with the logic
      with pytest.raises(ValueError) as msg:
          hist_fc = model.historical_forecasts(
              self.ts_pass_train,
              forecast_horizon=1,
              start=len(self.ts_pass_train) - n,
              retrain=False,
              enable_optimization=enable_optimization,
              predict_kwargs=invalid_predict_kwargs,
          )
      assert str(msg.value).startswith(
          "The following parameters cannot be passed in `predict_kwargs`"
      )
  
imports: import itertools
  from itertools import product
  import numpy
  import pandas
  import pytest
  import darts
  from darts import TimeSeries, concatenate
  from darts.dataprocessing.transformers import Scaler
  from darts.datasets import AirPassengersDataset
  from darts.logging import get_logger
  from darts.models import ARIMA, AutoARIMA, CatBoostModel, LightGBMModel, LinearRegressionModel, NaiveSeasonal, NotImportedModule
  from darts.tests.conftest import tfm_kwargs
  from darts.utils import timeseries_generation
label_desc: Use image node_id 24 for calling the TestHistoricalforecast obj's underlying member method code with example usage: obj.test_predict_kwargs(model_type, enable_optimization) without return types