class_docstr: Torchscript-enabled version of preprocessing done by TimeseriesFeatureMixin.add_feature_data.
class_docstr_tok: ["Torchscript-enabled","version","of","preprocessing","done","by","TimeseriesFeatureMixin.add_feature_data","."]
code: def forward_list_of_tensors(
      self, v: List[torch.Tensor]
  ) -> torch.Tensor:
      v = [self._nan_to_fill_value(v_i) for v_i in v]
  
      if self.padding == "right":
          timeseries_matrix = torch.nn.utils.rnn.pad_sequence(
              v, batch_first=True, padding_value=self.padding_value
          )
          timeseries_matrix = timeseries_matrix[
              :, : self.max_timeseries_length
          ]
      else:
          reversed_timeseries = [
              torch.flip(v_i[: self.max_timeseries_length], dims=(0,))
              for v_i in v
          ]
          reversed_timeseries_padded = torch.nn.utils.rnn.pad_sequence(
              reversed_timeseries,
              batch_first=True,
              padding_value=self.padding_value,
          )
          timeseries_matrix = torch.flip(
              reversed_timeseries_padded, dims=(1,)
          )
      return timeseries_matrix
  
imports: import logging
  from typing import Dict, List, TYPE_CHECKING, Union
  import numpy
  import torch
  from ludwig.constants import COLUMN, HIDDEN, LOGITS, NAME, PREDICTIONS, PROC_COLUMN, TIMESERIES
  from ludwig.features.base_feature import BaseFeatureMixin, OutputFeature, PredictModule
  from ludwig.features.sequence_feature import SequenceInputFeature
  from ludwig.features.vector_feature import _VectorPostprocessing, _VectorPredict
  from ludwig.schema.features.timeseries_feature import TimeseriesInputFeatureConfig, TimeseriesOutputFeatureConfig
  from ludwig.types import FeatureMetadataDict, ModelConfigDict, PreprocessingConfigDict, TrainingSetMetadataDict
  from ludwig.utils.tokenizers import get_tokenizer_from_registry, TORCHSCRIPT_COMPATIBLE_TOKENIZERS
  from ludwig.utils.types import Series, TorchscriptPreprocessingInput
label_desc: Use image node_id 4 for calling the _TimeseriesPreprocessing obj's underlying member method code with example usage: obj.forward_list_of_tensors(v) and returns: timeseries_matrix