code: def __getitem__(self, idx):
      if isinstance(idx, int):
          # Parse temporal data and pad its left
          temporal = torch.zeros(
              size=(len(self.temporal_cols), self.max_size),
              dtype=torch.float32,
          )
          ts = self.temporal[self.indptr[idx] : self.indptr[idx + 1], :]
          temporal[: len(self.temporal_cols), -len(ts) :] = ts.permute(
              1, 0
          )
  
          # Add static data if available
          static = None if self.static is None else self.static[idx, :]
  
          item = dict(
              temporal=temporal,
              temporal_cols=self.temporal_cols,
              static=static,
              static_cols=self.static_cols,
              y_idx=self.y_idx,
          )
  
          return item
      raise ValueError(f"idx must be int, got {type(idx)}")
  
imports: import warnings
  from collections.abc import Mapping
  import numpy
  import pandas
  import pytorch_lightning
  import torch
  import utilsforecast.processing
  from torch.utils.data import Dataset, DataLoader
  from utilsforecast.compat import DataFrame, pl_Series
label_desc: Use image node_id 2 for calling the TimeSeriesDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: item