class_docstr: A batch of series from different base datasets, represented by the padded batch, the lengths of the series
  and the splits sizes indicating the corresponding base dataset.
class_docstr_tok: ["A","batch","of","series","from","different","base","datasets",",","represented","by","the","padded","batch",",","the","lengths","of","the","series","and","the","splits","sizes","indicating","the","corresponding","base","dataset","."]
docstr: Choose the first element of every split section and return the resulting series batch.
  This method should only be used on query (past and future) series batches.
docstr_tok: ["Choose","the","first","element","of","every","split","section","and","return","the","resulting","series","batch",".","This","method","should","only","be","used","on","query","(","past","and","future",")","series","batches","."]
code: def one_per_split(self) -> SeriesBatch:
      """
      Choose the first element of every split section and return the resulting series batch.
      This method should only be used on query (past and future) series batches.
      """
      splits = torch.split(self.sequences, self.split_sections.tolist())
      lengths = torch.split(self.lengths, self.split_sections.tolist())
      return SeriesBatch(
          sequences=torch.cat(tuple(split[0:1] for split in splits)),
          lengths=torch.cat(tuple(l[0:1] for l in lengths)),
          split_sections=torch.ones(len(splits), dtype=int),
      )
  
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 6 for calling the SeriesBatch obj's underlying member method code with example usage: obj.one_per_split() and returns: SeriesBatch