class_docstr: Torchscript-enabled version of preprocessing done by SequenceFeatureMixin.add_feature_data.
code: def __init__(self, metadata: TrainingSetMetadataDict):
      super().__init__()
      self.lowercase = metadata["preprocessing"]["lowercase"]
      self.tokenizer_type = metadata["preprocessing"]["tokenizer"]
      self.tokenizer = get_tokenizer_from_registry(self.tokenizer_type)(
          pretrained_model_name_or_path=metadata["preprocessing"].get(
              "pretrained_model_name_or_path", None
          )
      )
  
      if not isinstance(self.tokenizer, torch.nn.Module):
          raise ValueError(
              f"tokenizer must be a torch.nn.Module, got {self.tokenizer}"
          )
  
      self.padding_symbol = metadata["preprocessing"]["padding_symbol"]
      self.unknown_symbol = metadata["preprocessing"]["unknown_symbol"]
      self.start_symbol = START_SYMBOL
      self.stop_symbol = STOP_SYMBOL
      self.max_sequence_length = int(metadata["max_sequence_length"])
      self.unit_to_id = metadata["str2idx"]
      self.computed_fill_value = metadata["preprocessing"][
          "computed_fill_value"
      ]
  
imports: import logging
  from functools import partial
  from typing import Dict, List, Union
  import numpy
  import torch
  from ludwig.constants import COLUMN, LAST_PREDICTIONS, LENGTHS, NAME, PREDICTIONS, PROBABILITIES, PROBABILITY, PROC_COLUMN, SEQUENCE
  from ludwig.features.base_feature import BaseFeatureMixin, InputFeature, OutputFeature, PredictModule
  from ludwig.features.feature_utils import compute_sequence_probability, compute_token_probabilities
  from ludwig.schema.features.sequence_feature import SequenceInputFeatureConfig, SequenceOutputFeatureConfig
  from ludwig.types import FeatureMetadataDict, FeaturePostProcessingOutputDict, ModelConfigDict, PreprocessingConfigDict, TrainingSetMetadataDict
  from ludwig.utils import output_feature_utils
  from ludwig.utils.math_utils import softmax
  from ludwig.utils.strings_utils import build_sequence_matrix, create_vocabulary, SpecialSymbol, START_SYMBOL, STOP_SYMBOL, UNKNOWN_SYMBOL
  from ludwig.utils.tokenizers import get_tokenizer_from_registry
  from ludwig.utils.types import TorchscriptPreprocessingInput
label_desc: Use image node_id 1 to create a new _SequencePreprocessing object from inherited base classes: torch.nn with example: obj = _SequencePreprocessing(metadata)