code: def test_multivariate_estimator_with_features(estimator_constructor):
      freq = "1h"
      prediction_length = 12
      estimator = estimator_constructor(freq, prediction_length)
  
      training_dataset = [
          {
              "start": pd.Period("2021-01-01 00:00:00", freq=freq),
              "target": np.ones((3, 200), dtype=np.float32),
              "feat_static_cat": np.array([0, 1], dtype=np.float32),
              "feat_static_real": np.array([42.0], dtype=np.float32),
              "feat_dynamic_real": np.ones((3, 200), dtype=np.float32),
              "__unused__": np.ones(3, dtype=np.float32),
          },
          {
              "start": pd.Period("2021-02-01 00:00:00", freq=freq),
              "target": np.ones((3, 100), dtype=np.float32),
              "feat_static_cat": np.array([1, 0], dtype=np.float32),
              "feat_static_real": np.array([1.0], dtype=np.float32),
              "feat_dynamic_real": np.ones((3, 100), dtype=np.float32),
              "__unused__": np.ones(5, dtype=np.float32),
          },
      ]
  
      prediction_dataset = [
          {
              "start": pd.Period("2021-01-01 00:00:00", freq=freq),
              "target": np.ones((3, 200), dtype=np.float32),
              "feat_static_cat": np.array([0, 1], dtype=np.float32),
              "feat_static_real": np.array([42.0], dtype=np.float32),
              "feat_dynamic_real": np.ones(
                  (3, 200 + prediction_length), dtype=np.float32
              ),
              "__unused__": np.ones(3, dtype=np.float32),
          },
          {
              "start": pd.Period("2021-02-01 00:00:00", freq=freq),
              "target": np.ones((3, 100), dtype=np.float32),
              "feat_static_cat": np.array([1, 0], dtype=np.float32),
              "feat_static_real": np.array([1.0], dtype=np.float32),
              "feat_dynamic_real": np.ones(
                  (3, 100 + prediction_length), dtype=np.float32
              ),
              "__unused__": np.ones(5, dtype=np.float32),
          },
      ]
  
      predictor = estimator.train(
          training_data=training_dataset,
          validation_data=training_dataset,
      )
  
      with tempfile.TemporaryDirectory() as td:
          predictor.serialize(Path(td))
          predictor_copy = Predictor.deserialize(Path(td))
  
      assert predictor == predictor_copy
  
      forecasts = predictor_copy.predict(prediction_dataset)
  
      for f in islice(forecasts, 5):
          f.mean
  
file_path: gluonts/test/torch/model/test_multivariate_estimators.py
imports: import tempfile
  from itertools import islice
  from pathlib import Path
  import pytest
  import pandas
  import numpy
  from gluonts.dataset.repository import get_dataset
  from gluonts.dataset.multivariate_grouper import MultivariateGrouper
  from gluonts.model.predictor import Predictor
  from gluonts.torch.model.forecast import DistributionForecast
  from gluonts.torch.model.i_transformer import ITransformerEstimator
label_desc: Use image node_id 2 for calling a global function with example usage: test_multivariate_estimator_with_features(estimator_constructor) without return types