code: def test_smoke(
      Model,
      batch_shape,
      t_obs,
      t_forecast,
      obs_dim,
      cov_dim,
      time_reparam,
      dct_gradients,
      engine,
  ):
      model = Model()
      data = torch.randn(batch_shape + (t_obs, obs_dim))
      covariates = torch.randn(
          batch_shape + (t_obs + t_forecast, cov_dim)
      )
  
      if engine == "svi":
          forecaster = Forecaster(
              model,
              data,
              covariates[..., :t_obs, :],
              num_steps=2,
              log_every=1,
              time_reparam=time_reparam,
              dct_gradients=dct_gradients,
          )
      else:
          if dct_gradients is True:
              pytest.skip("Duplicated test.")
          forecaster = HMCForecaster(
              model,
              data,
              covariates[..., :t_obs, :],
              max_tree_depth=1,
              num_warmup=1,
              num_samples=1,
              jit_compile=False,
          )
  
      num_samples = 5
      samples = forecaster(data, covariates, num_samples)
      assert samples.shape == (num_samples,) + batch_shape + (
          t_forecast,
          obs_dim,
      )
      samples = forecaster(data, covariates, num_samples, batch_size=2)
      assert samples.shape == (num_samples,) + batch_shape + (
          t_forecast,
          obs_dim,
      )
  
imports: import pytest
  import torch
  import pyro
  import pyro.distributions
  import pyro.poutine
  from pyro.contrib.forecast import Forecaster, ForecastingModel, HMCForecaster
  from pyro.infer.autoguide import AutoDelta
  from pyro.infer.reparam import LinearHMMReparam, StableReparam
  from pyro.optim import Adam
label_desc: Use image node_id 1 for calling a global function with example usage: test_smoke(Model, batch_shape, t_obs, t_forecast, obs_dim, cov_dim, time_reparam, dct_gradients, engine) without return types