code: def ts_iter(dataset: Dataset, freq) -> pd.DataFrame:
      for data_entry in add_ts_dataframe(iter(dataset), freq):
          yield data_entry["ts"]
  
imports: import json
  import pickle
  import random
  import torch
  import numpy
  import pandas
  from tqdm.auto import tqdm
  from typing import Iterator
  from gluonts.dataset.common import DataEntry, Dataset, ListDataset
label_desc: Use image node_id 5 for calling a global function with example usage: ts_iter(dataset, freq) without return types