code: def _predict(
      self,
      n: int,
      series: Optional[TimeSeries] = None,
      historic_future_covariates: Optional[TimeSeries] = None,
      future_covariates: Optional[TimeSeries] = None,
      num_samples: int = 1,
      verbose: bool = False,
  ) -> TimeSeries:
      super()._predict(
          n,
          series,
          historic_future_covariates,
          future_covariates,
          num_samples,
      )
      time_index = self._generate_new_dates(n, input_series=series)
      placeholder_vals = (
          np.zeros((n, self.training_series.width)) * np.nan
      )
      series_future = TimeSeries.from_times_and_values(
          time_index,
          placeholder_vals,
          columns=self.training_series.columns,
          static_covariates=self.training_series.static_covariates,
          hierarchy=self.training_series.hierarchy,
      )
  
      series = series.append(series_future)
      if historic_future_covariates is not None:
          future_covariates = historic_future_covariates.append(
              future_covariates
          )
  
      filtered_series = self.darts_kf.filter(
          series=series,
          covariates=future_covariates,
          num_samples=num_samples,
      )
  
      return filtered_series[-n:]
  
file_path: darts/darts/models/forecasting/kalman_forecaster.py
imports: from typing import Optional
  import numpy
  from nfoursid.kalman import Kalman
  from darts.logging import get_logger
  from darts.models.filtering.kalman_filter import KalmanFilter
  from darts.models.forecasting.forecasting_model import TransferableFutureCovariatesLocalForecastingModel
  from darts.timeseries import TimeSeries
label_desc: Use image node_id 4 for calling the KalmanForecaster obj's underlying member method code with example usage: obj._predict(n, series, historic_future_covariates, future_covariates, num_samples, verbose) and returns: filtered_series