code: def get_test_data(
      history_length: int, freq: str, dtype=np.float32
  ) -> pd.Series:
      index = pd.date_range(
          "1/1/2011", periods=history_length, freq=freq
      )
      return pd.Series(np.arange(len(index), dtype=dtype), index=index)
  
file_path: gluonts/test/model/npts/test_npts.py
imports: from typing import Optional
  import numpy
  import pandas
  import pytest
  from gluonts.dataset.common import DataEntry, Dataset
  from gluonts.exceptions import GluonTSDataError
  from gluonts.model.npts import KernelType, NPTSPredictor
  from gluonts.model.npts._weighted_sampler import WeightedSampler
label_desc: Use image node_id 1 for calling a global function with example usage: get_test_data(history_length, freq, dtype) and returns: pd