class_docstr: The sampling triplet dataset randomly samples support sets and past queries
  along with their future prediction horizon.
  All three sets consist of time series windows sliced from the original time series. The support set time series
  end before the prediction horizon begins to avoid time leakage.
  The dataset yields infinitely many items. Support set time series length is for now context_length.
class_docstr_tok: ["The","sampling","triplet","dataset","randomly","samples","support","sets","and","past","queries","along","with","their","future","prediction","horizon",".","All","three","sets","consist","of","time","series","windows","sliced","from","the","original","time","series",".","The","support","set","time","series","end","before","the","prediction","horizon","begins","to","avoid","time","leakage",".","The","dataset","yields","infinitely","many","items",".","Support","set","time","series","length","is","for","now","context_length","."]
code: def __iter__(self) -> Iterator[Triplet]:
      while True:
          (
              query_past,
              query_future,
              cheat_query,
              query_idx,
          ) = self._sample_queries()
  
          # We do not use the qsplit option for training
          support_set = sample_supps(
              supps_size=self.support_set_size,
              length=self.support_length,
              dataset=self.dataset,
              cheat_query=cheat_query[0]
              if np.random.rand() < self.cheat
              else None,
              index_iterator=self.index_iterator
              if self.catch22_nn is None
              else iter(self.catch22_nn[query_idx]),
          )
          yield Triplet(support_set, query_past, query_future)
  
imports: from __future__ import annotations
  import numpy
  import pandas
  from dataclasses import dataclass, fields
  from typing import Iterator, List, Optional
  import torch
  from torch.utils.data import IterableDataset, Dataset
  from .dataset import TimeSeries, TimeSeriesDataset
label_desc: Use image node_id 2 for calling the SamplingTripletDataset obj's underlying member method code with example usage: obj.__iter__() without return types