code: def _to_dataframe(
      input_label: Tuple[DataEntry, DataEntry]
  ) -> pd.DataFrame:
      """
      Turn a pair of consecutive (in time) data entries into a dataframe.
      """
      start = input_label[0][FieldName.START]
      targets = [entry[FieldName.TARGET] for entry in input_label]
      full_target = np.concatenate(targets, axis=-1)
      index = period_index(
          {FieldName.START: start, FieldName.TARGET: full_target}
      )
      return pd.DataFrame(full_target.transpose(), index=index)
  
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 1 for calling a global function with example usage: _to_dataframe(input_label) and returns: pd