code: def test_deepar_smoke(
      distr_output, estimator, datasets, dtype, impute_missing_values
  ):
      estimator = estimator(
          distr_output=distr_output,
          dtype=dtype,
          impute_missing_values=impute_missing_values,
      )
      dataset_train, dataset_test = datasets
      predictor = estimator.train(dataset_train)
      forecasts = list(predictor.predict(dataset_test))
      assert all(
          [forecast.samples.dtype == dtype for forecast in forecasts]
      )
      assert len(forecasts) == len(dataset_test)
  
imports: from functools import partial
  import numpy
  import pytest
  from gluonts.mx import DeepAREstimator
  from gluonts.mx.distribution import PiecewiseLinearOutput, StudentTOutput
  from gluonts.mx.trainer import Trainer
  from gluonts.testutil.dummy_datasets import make_dummy_datasets_with_features
label_desc: Use image node_id 1 for calling a global function with example usage: test_deepar_smoke(distr_output, estimator, datasets, dtype, impute_missing_values) without return types