code: def test_tt_decode():
      train_data = "../data/tt/train-eval-grammar.csv"
      save_path = "data/tt/decode-test/"
  
      args = TTTrainArgs(
          num_train_epochs=1,
          save_path=save_path,
          max_input_length=1024,
          max_output_length=1024,
      )
  
      happy_tt.train(train_data, args=args)
  
      tok_data = load_from_disk(save_path)
  
      inputs = []
      targets = []
  
      with open(train_data, newline="") as csvfile:
          reader = csv.DictReader(csvfile)
          for row in reader:
              inputs.append(row["input"] + "</s>")
              targets.append(row["target"] + "</s>")
  
      for case in tok_data["train"]:
          intput_case = happy_tt.tokenizer.decode(case["input_ids"])
          target_case = happy_tt.tokenizer.decode(case["labels"])
          # we shuffle the training cases so we just confirm the detokenized results
          # exist within the raw data
          assert intput_case in inputs
          assert target_case in targets
  
file_path: happy-transformer/tests/test_detok.py
imports: import csv
  from happytransformer import HappyWordPrediction, GENTrainArgs, TTTrainArgs, WPTrainArgs
  from datasets import load_from_disk
  from tests import happy_gen, happy_tt, happy_wp
label_desc: Use image node_id 4 for calling a global function with example usage: test_tt_decode() without return types