code: def test_deepar_nonnegative_pred_samples(
      distr_output,
      datasets,
      dtype,
      impute_missing_values,
      symbol_block_predictor,
  ):
      estimator = DeepAREstimator(
          distr_output=distr_output,
          dtype=dtype,
          impute_missing_values=impute_missing_values,
          nonnegative_pred_samples=True,
          freq="D",
          prediction_length=3,
          trainer=Trainer(epochs=1, num_batches_per_epoch=1),
      )
  
      dataset_train, dataset_test = datasets
      predictor = estimator.train(dataset_train)
  
      if symbol_block_predictor:
          predictor = predictor.as_symbol_block_predictor(
              dataset=dataset_test
          )
  
      forecasts = list(predictor.predict(dataset_test))
      assert all(
          [forecast.samples.dtype == dtype for forecast in forecasts]
      )
      assert len(forecasts) == len(dataset_test)
  
      for forecast in forecasts:
          assert (forecast.samples >= 0).all()
  
imports: import numpy
  import pytest
  from gluonts.mx import DeepAREstimator
  from gluonts.mx.distribution import 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_nonnegative_pred_samples(distr_output, datasets, dtype, impute_missing_values, symbol_block_predictor) without return types