code: def test_get_decoded_targets_and_predictions():
      tokenizer = AutoTokenizer.from_pretrained(TEST_MODEL_NAME)
      vocab_size = 8
  
      # Scenario 1: Prediction and target tensors have the same length, so nothing should change
      targets = torch.tensor([[78, 79, 504, 76, 397, 84, 0]])
      predictions = {
          PREDICTIONS: torch.tensor(
              [[78, 79, 504, 76, 397, 84, 0]], dtype=torch.int64
          ),
          PROBABILITIES: torch.randn(1, 7, vocab_size).to(
              torch.float32
          ),
          LOGITS: torch.randn(1, 7, vocab_size).to(torch.float32),
      }
      (
          decoded_targets,
          decoded_predictions,
      ) = text_feature.get_decoded_targets_and_predictions(
          targets, predictions, tokenizer
      )
  
      assert decoded_targets == [" first she 18 yearman our<s>"]
      assert decoded_predictions == [" first she 18 yearman our<s>"]
  
file_path: ludwig/tests/ludwig/features/test_text_feature.py
imports: import pandas
  import torch
  from transformers import AutoTokenizer
  from ludwig.backend import LocalBackend
  from ludwig.constants import LOGITS, PREDICTIONS, PROBABILITIES
  from ludwig.features import text_feature
label_desc: Use image node_id 2 for calling a global function with example usage: test_get_decoded_targets_and_predictions() without return types