docstr: Returns all metadata for the given text feature.
  
  Raises:
      ValueError, if the tokenized prompt template is longer than the max sequence length.
docstr_tok: ["Returns","all","metadata","for","the","given","text","feature",".","Raises",":","ValueError",",","if","the","tokenized","prompt","template","is","longer","than","the","max","sequence","length","."]
code: def get_feature_meta(
      config: ModelConfigDict,
      column,
      preprocessing_parameters: PreprocessingConfigDict,
      backend,
      is_input_feature: bool,
  ) -> FeatureMetadataDict:
      """Returns all metadata for the given text feature.
  
      Raises:
          ValueError, if the tokenized prompt template is longer than the max sequence length.
      """
      prompt_template = config.get("prompt", {}).get("template", "")
      vocabulary: Vocabulary = create_vocabulary(
          column,
          tokenizer_type=preprocessing_parameters["tokenizer"],
          num_most_frequent=preprocessing_parameters["most_common"],
          lowercase=preprocessing_parameters["lowercase"],
          vocab_file=preprocessing_parameters["vocab_file"],
          unknown_symbol=preprocessing_parameters["unknown_symbol"],
          padding_symbol=preprocessing_parameters["padding_symbol"],
          pretrained_model_name_or_path=preprocessing_parameters[
              "pretrained_model_name_or_path"
          ],
          ngram_size=preprocessing_parameters["ngram_size"],
          compute_idf=preprocessing_parameters["compute_idf"],
          processor=backend.df_engine,
          prompt_template=prompt_template,
      )
      # Note: The vocabulary's max_sequence_length includes the prompt template, which is merged into the column prior
      # to computing feature metadata.
      logger.info(
          f"Max length of feature '{column.name}': {vocabulary.max_sequence_length} (without start and stop symbols)"
      )
  
      (
          max_sequence_length,
          max_sequence_length_99ptile,
      ) = _get_metadata_reconciled_max_sequence_length(
          preprocessing_parameters, vocabulary
      )
  
      if (
          is_input_feature
          and max_sequence_length
          < vocabulary.prompt_template_num_tokens
      ):
          raise ValueError(
              f"The input feature's max sequence length ({max_sequence_length}) is shorter than the prompt template "
              f"length ({vocabulary.prompt_template_num_tokens}). This will truncate all unique information. "
              "Consider making the template shorter or increasing the input feature's max sequence length to a "
              f"value >> {vocabulary.prompt_template_num_tokens}."
          )
  
      logger.info(
          f"Max sequence length is {max_sequence_length} for feature '{column.name}'"
      )
  
      return {
          "idx2str": vocabulary.vocab,
          "str2idx": vocabulary.str2idx,
          "str2freq": vocabulary.str2freq,
          "str2idf": vocabulary.str2idf,
          "vocab_size": len(vocabulary.vocab),
          "max_sequence_length": max_sequence_length,
          "max_sequence_length_99ptile": max_sequence_length_99ptile,
          "pad_idx": vocabulary.pad_idx,
          "padding_symbol": vocabulary.padding_symbol,
          "unknown_symbol": vocabulary.unknown_symbol,
          "prompt_template_num_tokens": vocabulary.prompt_template_num_tokens,
      }
  
imports: import logging
  from functools import partial
  from typing import Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from torch import Tensor
  from transformers import PreTrainedTokenizer
  from ludwig.constants import COLUMN, IGNORE_INDEX_TOKEN_ID, LAST_PREDICTIONS, LENGTHS, NAME, PREDICTIONS, PREPROCESSING, PROBABILITIES, PROBABILITY, PROC_COLUMN, RESPONSE, TEXT
  from ludwig.features.base_feature import BaseFeatureMixin, OutputFeature
  from ludwig.features.feature_utils import compute_sequence_probability, compute_token_probabilities
  from ludwig.features.sequence_feature import _SequencePostprocessing, _SequencePreprocessing, SequenceInputFeature, SequenceOutputFeature
  from ludwig.modules.metric_registry import get_metric_tensor_input
  from ludwig.schema.features.text_feature import TextInputFeatureConfig, TextOutputFeatureConfig
  from ludwig.types import FeatureMetadataDict, ModelConfigDict, PreprocessingConfigDict, TrainingSetMetadataDict
  from ludwig.utils.math_utils import softmax
  from ludwig.utils.strings_utils import build_sequence_matrix, create_vocabulary, get_tokenizer, SpecialSymbol, UNKNOWN_SYMBOL, Vocabulary
label_desc: Use image node_id 3 for calling the TextFeatureMixin obj's underlying member method code with example usage: obj.get_feature_meta(config, column, preprocessing_parameters, backend, is_input_feature) and returns: dict