code: def test_wp_csv_decode():
      happy = HappyWordPrediction("BERT", "bert-base-uncased")
      train_data = "../data/wp/train-eval.csv"
      save_path = "data/wp/decode-test/"
  
      args_max_len_truncation = WPTrainArgs(
          num_train_epochs=1, save_path=save_path
      )
  
      happy.train(train_data, args=args_max_len_truncation)
  
      tok_data = load_from_disk(save_path)
  
      lines = []
      with open(train_data, newline="") as csvfile:
          reader = csv.DictReader(csvfile)
          for row in reader:
              lines.append(row["text"])
  
      def clean_detok_case(detok_case):
          detok_case = detok_case.replace("line", "Line")
          detok_case = detok_case.replace(" : this", ": This")
  
          return detok_case
  
      for case in tok_data["train"]["input_ids"]:
          detok_case = happy_wp.tokenizer.decode(
              case, skip_special_tokens=True
          )
          detok_case = clean_detok_case(detok_case)
          assert detok_case in lines
  
      for case in tok_data["eval"]["input_ids"]:
          detok_case = happy_wp.tokenizer.decode(
              case, skip_special_tokens=True
          )
          detok_case = clean_detok_case(detok_case)
          assert detok_case in lines
  
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 5 for calling a global function with example usage: test_wp_csv_decode() and returns: detok_case