code: def test_gen_eval_basic():
      result = happy_gen.eval("../data/gen/train-eval.txt")
      assert type(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 8 for calling a global function with example usage: test_gen_eval_basic() without return types