code: def build_matrix(
      timeseries,
      tokenizer_name,
      length_limit,
      padding_value,
      padding,
      backend,
  ):
      tokenizer = get_tokenizer_from_registry(tokenizer_name)()
  
      ts_vectors = backend.df_engine.map_objects(
          timeseries,
          lambda ts: np.nan_to_num(
              np.array(tokenizer(ts)).astype(np.float32),
              nan=padding_value,
          ),
      )
  
      max_length = backend.df_engine.compute(ts_vectors.map(len).max())
      if max_length < length_limit:
          logger.debug(
              f"max length of {tokenizer_name}: {max_length} < limit: {length_limit}"
          )
      max_length = length_limit
  
      def pad(vector):
          padded = np.full(
              (max_length,), padding_value, dtype=np.float32
          )
          limit = min(vector.shape[0], max_length)
          if padding == "right":
              padded[:limit] = vector[:limit]
          else:  # if padding == 'left
              padded[max_length - limit :] = vector[:limit]
          return padded
  
      return backend.df_engine.map_objects(ts_vectors, pad)
  
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 TimeseriesFeatureMixin obj's underlying member method code with example usage: obj.build_matrix(timeseries, tokenizer_name, length_limit, padding_value, padding, backend) and returns: backend, padded