code: def evaluate_epoch(args, vocab, data, model, criterion):
      """
      Run an evaluation over entire dataset.
      """
      model.eval()
      device = next(model.parameters()).device
      hidden = None
      total_loss = 0
      if isinstance(data, GeneratorType):
          data = list(data)
          assert len(data) == 1, "Only support single dev/test file"
          data = data[0]
      batches = batchify(data, args["batch_size"], device)
      with torch.no_grad():
          for i in range(0, batches.size(1) - 1, args["bptt_size"]):
              data, target = get_batch(batches, i, args["bptt_size"])
              lens = [data.size(1) for i in range(data.size(0))]
  
              output, hidden, decoded = model.forward(
                  data, lens, hidden
              )
              loss = criterion(
                  decoded.view(-1, len(vocab["char"])), target
              )
  
              hidden = repackage_hidden(hidden)
              total_loss += data.size(1) * loss.data.item()
      return total_loss / batches.size(1)
  
imports: import argparse
  from copy import copy
  import logging
  import lzma
  import math
  import os
  import random
  import time
  from types import GeneratorType
  import numpy
  import torch
  from stanza.models.common.char_model import build_charlm_vocab, CharacterLanguageModel, CharacterLanguageModelTrainer
  from stanza.models.common.vocab import CharVocab
  from stanza.models.common import utils
  from stanza.models import _training_logging
label_desc: Use image node_id 10 for calling a global function with example usage: evaluate_epoch(args, vocab, data, model, criterion) and returns: unknown