code: def test_gen_train_eval_with_dataclass():
      train_args = GENTrainArgs(learning_rate=0.01, num_train_epochs=1)
  
      happy_gen.train("../data/gen/train-eval.txt", args=train_args)
  
      eval_args = GENEvalArgs()
  
      after_result = happy_gen.eval(
          "../data/wp/train-eval.txt", args=eval_args
      )
  
      assert type(after_result.loss) == float
  
imports: import torch
  from happytransformer import HappyGeneration, GENSettings, GENTrainArgs, GENEvalArgs
  import pytest
  from tests.run_save_load import run_save_load
  from tests import happy_gen
label_desc: Use image node_id 14 for calling a global function with example usage: test_gen_train_eval_with_dataclass() without return types