code: def make_evaluation_predictions(
      dataset: Dataset,
      predictor: Predictor,
      num_samples: int = 100,
  ) -> Tuple[Iterator[Forecast], Iterator[pd.Series]]:
      """
      Returns predictions for the trailing prediction_length observations of the
      given time series, using the given predictor.
  
      The predictor will take as input the given time series without the trailing
      prediction_length observations.
  
      Parameters
      ----------
      dataset
          Dataset where the evaluation will happen. Only the portion excluding
          the prediction_length portion is used when making prediction.
      predictor
          Model used to draw predictions.
      num_samples
          Number of samples to draw on the model when evaluating. Only
          sampling-based models will use this.
  
      Returns
      -------
      Tuple[Iterator[Forecast], Iterator[pd.Series]]
          A pair of iterators, the first one yielding the forecasts, and the
          second one yielding the corresponding ground truth series.
      """
  
      window_length = predictor.prediction_length + predictor.lead_time
      _, test_template = split(dataset, offset=-window_length)
      test_data = test_template.generate_instances(window_length)
  
      return (
          predictor.predict(test_data.input, num_samples=num_samples),
          map(_to_dataframe, test_data),
      )
  
file_path: gluonts/src/gluonts/evaluation/backtest.py
imports: import logging
  from typing import Optional, Tuple, Iterator
  import numpy
  import pandas
  from gluonts.dataset.common import DataEntry, Dataset
  from gluonts.dataset.field_names import FieldName
  from gluonts.dataset.split import split
  from gluonts.dataset.stat import calculate_dataset_statistics
  from gluonts.dataset.util import period_index
  from gluonts.evaluation import Evaluator
  from gluonts.model.forecast import Forecast
  from gluonts.model.predictor import Predictor
  from gluonts.itertools import maybe_len
label_desc: Use image node_id 2 for calling a global function with example usage: make_evaluation_predictions(dataset, predictor, num_samples) and returns: predictor,  map