'Updates the internal evaluation result.
Parameters
labels : list of `NDArray`
The labels of the data.
preds : list of `NDArray`
Predicted values.'

def update(self, labels, preds):

    if (not self._allow_extra_outputs):
        check_label_shapes(labels, preds)
    for (pred, label) in zip(preds, labels):
        label = label.asnumpy()
        pred = pred.asnumpy()
        reval = self._feval(label, pred)
        if isinstance(reval, tuple):
            (sum_metric, num_inst) = reval
            self.sum_metric += sum_metric
            self.num_inst += num_inst
        else:
            self.sum_metric += reval
            self.num_inst += 1
