code: def test_deepvar_hierarchical(
      sine7,
      likelihood_weight,
      CRPS_weight,
      sample_LH,
      coherent_train_samples,
      coherent_pred_samples,
      warmstart_epoch_frac,
  ):
      train_datasets = sine7()
      prediction_length = 10
  
      estimator = DeepVARHierarchicalEstimator(
          freq=train_datasets.metadata.freq,
          prediction_length=prediction_length,
          S=train_datasets.metadata.S,
          likelihood_weight=likelihood_weight,
          CRPS_weight=CRPS_weight,
          sample_LH=sample_LH,
          coherent_train_samples=coherent_train_samples,
          coherent_pred_samples=coherent_pred_samples,
          warmstart_epoch_frac=warmstart_epoch_frac,
          trainer=Trainer(
              epochs=10,
              num_batches_per_epoch=1,
              hybridize=False,
          ),
          num_samples_for_loss=10,
      )
  
      predictor = estimator.train(training_data=train_datasets.train)
  
      agg_metrics, _ = backtest_metrics(
          test_dataset=train_datasets.test,
          predictor=predictor,
          evaluator=MultivariateEvaluator(
              quantiles=(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9)
          ),
      )
  
      assert agg_metrics["ND"] < 1.5
  
imports: import pytest
  from gluonts.evaluation import backtest_metrics, MultivariateEvaluator
  from gluonts.mx.model.deepvar_hierarchical import DeepVARHierarchicalEstimator
  from gluonts.mx.trainer import Trainer
label_desc: Use image node_id 1 for calling a global function with example usage: test_deepvar_hierarchical(sine7, likelihood_weight, CRPS_weight, sample_LH, coherent_train_samples, coherent_pred_samples, warmstart_epoch_frac) without return types