class_docstr: The triplet dataset gets a list of queries and corresponding support set and returns them as triplets.
class_docstr_tok: ["The","triplet","dataset","gets","a","list","of","queries","and","corresponding","support","set","and","returns","them","as","triplets","."]
code: def __init__(
      self,
      queries: TimeSeriesDataset,
      support_sets: List[List[TimeSeries]],
  ):
      self.queries = queries
      self.support_sets = support_sets
      assert len(queries) == len(
          support_sets
      ), "For each query there must be exactly one support set"
  
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 1 to create a new TripletDataset object from inherited base classes: Dataset with example: obj = TripletDataset(queries, support_sets)