code: def evaluate_tagger(model, dev_X, dev_Y, batch_size):
      correct = 0.0
      total = 0.0
      for i in range(0, len(dev_X), batch_size):
          Yh = model.predict(dev_X[i : i + batch_size])
          Y = dev_Y[i : i + batch_size]
          for j in range(len(Yh)):
              correct += (
                  Yh[j].argmax(axis=1) == Y[j].argmax(axis=1)
              ).sum()
              total += Yh[j].shape[0]
      return correct / total
  
file_path: thinc/thinc/tests/layers/test_basic_tagger.py
imports: import random
  import pytest
  from thinc.api import Adam, HashEmbed, Model, Relu, Softmax, chain, expand_window, strings2arrays, with_array
label_desc: Use image node_id 4 for calling a global function with example usage: evaluate_tagger(model, dev_X, dev_Y, batch_size) and returns: unknown