code: def evalerror(preds, dtrain):
      labels = dtrain.get_label()
      # return a pair metric_name, result
      # since preds are margin(before logistic transformation, cutoff at 0)
      return "error", float(sum(labels != (preds > 0.0))) / len(labels)
  
imports: import numpy
  import xgboost
label_desc: Use image node_id 2 for calling a global function with example usage: evalerror(preds, dtrain) and returns: str,  unknown