class_docstr: A triplet batch, composed of a batch of support sets, query contexts and prediction horizons.
  Compared to a simple triplet, it also manages the lengths of all samples.
class_docstr_tok: ["A","triplet","batch",",","composed","of","a","batch","of","support","sets",",","query","contexts","and","prediction","horizons",".","Compared","to","a","simple","triplet",",","it","also","manages","the","lengths","of","all","samples","."]
docstr: Selects the first query of every group of queries that use the same support set
  (see split_sections of queries) and returns the resulting triplet batch.
  Query past and future are reduced, support sets are not touched.
docstr_tok: ["Selects","the","first","query","of","every","group","of","queries","that","use","the","same","support","set","(","see","split_sections","of","queries",")","and","returns","the","resulting","triplet","batch",".","Query","past","and","future","are","reduced",",","support","sets","are","not","touched","."]
code: def reduce_to_unique_query(self) -> TripletBatch:
      """
      Selects the first query of every group of queries that use the same support set
      (see split_sections of queries) and returns the resulting triplet batch.
      Query past and future are reduced, support sets are not touched.
      """
      return TripletBatch(
          support_set=self.support_set,
          query_past=self.query_past.one_per_split(),
          query_future=self.query_future.one_per_split(),
      )
  
imports: from __future__ import annotations
  from dataclasses import dataclass
  from typing import List, Optional
  import torch
  from torch.nn.utils.rnn import pad_sequence
  from .sampling import Triplet
  from .dataset import TimeSeries
  from meta.common.torch import tensor_to_np
label_desc: Use image node_id 4 for calling the TripletBatch obj's underlying member method code with example usage: obj.reduce_to_unique_query() and returns: TripletBatch