code: def test_custom_warm_start():
      duration = 30
      obs_dim = 2
      covariates = torch.zeros(duration, 0)
      data = torch.randn(duration, obs_dim) + 4
      min_train_window = 10
  
      def forecaster_options(t0, t1, t2):
          if t1 == min_train_window:
              return {"num_steps": 2, "warm_start": True}
          else:
              return {"num_steps": 0, "warm_start": True}
  
      backtest(
          data,
          covariates,
          Model,
          min_train_window=min_train_window,
          test_window=10,
          forecaster_options=forecaster_options,
      )
  
file_path: pyro/tests/contrib/forecast/test_evaluate.py
imports: import math
  import pytest
  import torch
  import pyro
  import pyro.distributions
  from pyro.contrib.forecast import Forecaster, ForecastingModel, HMCForecaster, backtest
  from pyro.contrib.forecast.evaluate import DEFAULT_METRICS
  from pyro.util import optional
label_desc: Use image node_id 3 for calling a global function with example usage: test_custom_warm_start() and returns: dict, dict