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","."]
code: def to(self, device) -> SeriesBatch:
      return SeriesBatch(
          self.sequences.to(device),
          self.lengths.to(device),
          self.split_sections.to(device),
          scales=self.scales.to(device)
          if self.scales is not None
          else None,
      )
  
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 SeriesBatch obj's underlying member method code with example usage: obj.to(device) and returns: SeriesBatch