class_docstr: A data module which provides a collection of GluonTS datasets.
  
   Parameters
  ----------
  
  dataset_names_train: str
      Names of the GluonTS datasets used for training.
  dataset_names_val: str
      Names of the GluonTS datasets used for validation.
  dataset_names_test: str
      Names of the GluonTS datasets used for testing.
  num_queries: int
      Number of queries used for the same support set.
  support_set_size: int
      Number of time series in the support set.
  prediction_length: Optional[int]
      Number of predicted time steps.
  context_length_multiple: int
      Context length is prediction length x ``context_length_multiple``.
  support_length_multiple: int
      Support time series length is prediction length x ``support_length_multiple``.
  dataset_sampling: str
       To generate training samples, first a dataset is chosen from the pool of training datasets.
       Then a sample is chosen from the chosen dataset. Training datasets can either be sampled uniformly
       or weighted w.r.t. to the total number of observations.
  data_dir: Path
      Path to data.
  standardize: bool
      If each time series is standardized.
  batch_size_train: int
      Batch size during training.
  batch_size_val_test: int
      Batch size during validation and testing.
  num_workers: int
      Number of workers.
  seed: int
      The random seed.
  catch22_train: bool
      If catch22 similarity measure is used for support set selection during training.
  catch22_val_test: bool
      If catch22 similarity measure is used for support set selection during validation and testing.
  cheat: float
      Chance of hiding the ground truth in the support set.
class_docstr_tok: ["A","data","module","which","provides","a","collection","of","GluonTS","datasets",".","Parameters","--","--","--","--","--","dataset_names_train",":","str","Names","of","the","GluonTS","datasets","used","for","training",".","dataset_names_val",":","str","Names","of","the","GluonTS","datasets","used","for","validation",".","dataset_names_test",":","str","Names","of","the","GluonTS","datasets","used","for","testing",".","num_queries",":","int","Number","of","queries","used","for","the","same","support","set",".","support_set_size",":","int","Number","of","time","series","in","the","support","set",".","prediction_length",":","Optional","[","int","]","Number","of","predicted","time","steps",".","context_length_multiple",":","int","Context","length","is","prediction","length","x","``","context_length_multiple","``",".","support_length_multiple",":","int","Support","time","series","length","is","prediction","length","x","``","support_length_multiple","``",".","dataset_sampling",":","str","To","generate","training","samples",",","first","a","dataset","is","chosen","from","the","pool","of","training","datasets",".","Then","a","sample","is","chosen","from","the","chosen","dataset",".","Training","datasets","can","either","be","sampled","uniformly","or","weighted","w.r.t",".","to","the","total","number","of","observations",".","data_dir",":","Path","Path","to","data",".","standardize",":","bool","If","each","time","series","is","standardized",".","batch_size_train",":","int","Batch","size","during","training",".","batch_size_val_test",":","int","Batch","size","during","validation","and","testing",".","num_workers",":","int","Number","of","workers",".","seed",":","int","The","random","seed",".","catch22_train",":","bool","If","catch22","similarity","measure","is","used","for","support","set","selection","during","training",".","catch22_val_test",":","bool","If","catch22","similarity","measure","is","used","for","support","set","selection","during","validation","and","testing",".","cheat",":","float","Chance","of","hiding","the","ground","truth","in","the","support","set","."]
code: def train_dataloader(self) -> DataLoader[TripletBatch]:
      super_sampling_dataset = SuperSamplingTripletDataset(
          datasets=[
              dm.sampling_triplet_dataset("train")
              for dm in self.data_modules_train
          ],
          dataset_sampling=self.dataset_sampling,
      )
      return DataLoader(
          super_sampling_dataset,
          collate_fn=TripletBatch.collate,  # type: ignore
          batch_size=self.batch_size_train,
          num_workers=self.num_workers,
          pin_memory=True,
      )
  
file_path: gluonts/src/gluonts/nursery/few_shot_prediction/src/meta/datasets/super.py
imports: from typing import Optional, Tuple
  from pathlib import Path
  import pytorch_lightning
  from torch.utils.data import DataLoader
  from itertools import cycle
  from tqdm import tqdm
  from meta.data.batch import TripletBatch
  from meta.data.sampling import SuperSamplingTripletDataset
  from meta.datasets.registry import register_data_module
  from meta.datasets import get_data_module
label_desc: Use image node_id 4 for calling the SuperDataModule obj's underlying member method code with example usage: obj.train_dataloader() and returns: DataLoader