code: def _generate_evaluation_dataset(
      dataset: Dataset, prediction_length: int
  ) -> tuple[np.ndarray, ma.MaskedArray]:
      # Extract data from all the values in the dataset
      pasts = []
      past_lengths = []
      predictions = []
      for item in dataset:
          target = item["target"]
          pasts.append(target[:-prediction_length])
          past_lengths.append(target.shape[0] - prediction_length)
          predictions.append(target[-prediction_length:])
  
      # Compute masked past values as well as (non-masked) future values
      max_len = np.max(past_lengths)
      values = np.empty((len(dataset), max_len))
      mask = np.ones((len(dataset), max_len), dtype=bool)
      for i in range(len(dataset)):
          values[i, : past_lengths[i]] = pasts[i]
          mask[i, : past_lengths[i]] = False
  
      y_past = ma.masked_array(values, mask=mask)
      y_true = np.stack(predictions)
      return y_true, y_past
  
imports: from __future__ import annotations
  import json
  import shutil
  from dataclasses import dataclass, field
  from pathlib import Path
  from typing import cast, Dict, Tuple, Union
  import numpy
  import pandas
  from gluonts.dataset.common import Dataset, FileDataset, MetaData
  from numpy import ma
  from tsbench.constants import DEFAULT_DATA_CATCH22_PATH, DEFAULT_DATA_PATH, DEFAULT_DATA_STATS_PATH
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_evaluation_dataset(dataset, prediction_length) and returns: y_true,  y_past