code: def acc_eval(dataset, model):
      dataset.reset(shuffle=False)
      good = bad = 0.0
      for tree in dataset:
          dy.renew_cg()
          pred = np.argmax(
              model.predict_for_tree(
                  tree, decorate=False, training=False
              )
          )
          if pred == tree.label:
              good += 1
          else:
              bad += 1
      acc = good / (good + bad)
      return acc
  
imports: import codecs
  import numpy
  import dynet
label_desc: Use image node_id 1 for calling a global function with example usage: acc_eval(dataset, model) and returns: acc