code: def test_gen_text_len():
      MAX_LEN = 2
  
      train_data = "../data/gen/train-eval.txt"
      save_path = "data/gen/decode-test/"
  
      args = GENTrainArgs(
          num_train_epochs=1,
          eval_ratio=0,
          save_path=save_path,
          max_length=MAX_LEN,
      )
  
      happy_gen.train(train_data, args=args, eval_filepath=train_data)
  
      tok_data = load_from_disk(save_path)
  
      for case in tok_data["train"]["input_ids"]:
          assert len(case) == MAX_LEN
  
      for case in tok_data["eval"]["input_ids"]:
          assert len(case) == MAX_LEN
  
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 3 for calling a global function with example usage: test_gen_text_len() without return types