code: def test_encoders_support(self, config):
      # test some models that support encoders, once with user supplied covariates and once without
      model_object, fc = config
      # test case with pd.DatetimeIndex
      n = 3
  
      target = self.ts_gaussian[:-3]
  
      # encoder must be named function for pickling
      def extract_dayofweek(index):
          return index.dayofweek
  
      add_encoders = {"custom": {"future": [extract_dayofweek]}}
  
      series = (
          target
          if not isinstance(model_object, VARIMA)
          else target.stack(target.map(np.log))
      )
      model_params = {
          k: vals
          for k, vals in copy.deepcopy(
              model_object.model_params
          ).items()
      }
      model_params["add_encoders"] = add_encoders
      model = model_object.__class__(**model_params)
  
      # Test models with user supplied covariates
      model.fit(series, future_covariates=fc)
  
      prediction = model.predict(n, future_covariates=fc)
      assert len(prediction) == n
  
      if isinstance(
          model, TransferableFutureCovariatesLocalForecastingModel
      ):
          prediction = model.predict(
              n, series=series, future_covariates=fc
          )
          assert len(prediction) == n
  
imports: import copy
  import itertools
  import os
  import pathlib
  from typing import Callable
  from unittest.mock import Mock, patch
  import numpy
  import pandas
  import pytest
  from darts.datasets import AirPassengersDataset, IceCreamHeaterDataset
  from darts.logging import get_logger
  from darts.metrics import mape
  from darts.models import ARIMA, BATS, FFT, TBATS, VARIMA, AutoARIMA, Croston, ExponentialSmoothing, FourTheta, KalmanForecaster, LinearRegressionModel, NaiveDrift, NaiveMean, NaiveMovingAverage, NaiveSeasonal, NotImportedModule, Prophet, RandomForest, RegressionModel, StatsForecastAutoARIMA, StatsForecastAutoCES, StatsForecastAutoETS, StatsForecastAutoTheta, Theta
  from darts.models.forecasting.forecasting_model import LocalForecastingModel, TransferableFutureCovariatesLocalForecastingModel
  from darts.timeseries import TimeSeries
  from darts.utils import timeseries_generation
  from darts.utils.utils import ModelMode, SeasonalityMode, TrendMode
label_desc: Use image node_id 11 for calling the TestLocalForecastingModels obj's underlying member method code with example usage: obj.test_encoders_support(config) and returns: index