code: def evaluate(model: ActorCritic, test_env: gym.Env) -> float:
      (obs, _), terminated, truncated = test_env.reset(), False, False
      total_rew = 0.0
      while not terminated and not truncated:
          act = model(Tensor(obs))[0].argmax().item()
          obs, rew, terminated, truncated, _ = test_env.step(act)
          total_rew += float(rew)
      return total_rew
  
file_path: tinygrad/examples/beautiful_cartpole.py
imports: from typing import Tuple
  import time
  from tinygrad import Tensor, TinyJit, nn
  import gymnasium
  from tqdm import trange
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: evaluate(model, test_env) and returns: total_rew