code: def test_wp_train_eval_with_dataclass():
      train_args = WPTrainArgs(
          learning_rate=0.01,
          line_by_line=True,
          num_train_epochs=1,
          max_length=512,
      )
  
      happy_wp.train("../data/wp/train-eval.txt", args=train_args)
  
      eval_args = WPEvalArgs(line_by_line=True, max_length=512)
  
      after_result = happy_wp.eval(
          "../data/wp/train-eval.txt", args=eval_args
      )
  
imports: from pytest import approx
  from happytransformer import HappyWordPrediction, WPTrainArgs, WPEvalArgs
  from happytransformer.happy_word_prediction import WordPredictionResult
  from tests.run_save_load import run_save_load
  import pytest
  from tests import happy_wp
label_desc: Use image node_id 14 for calling a global function with example usage: test_wp_train_eval_with_dataclass() without return types