<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def evaluate_accuracy(data_iterator, net):
 """Function to evaluate accuracy of any data iterator passed to it as an argument"""

    acc = mx.metric.Accuracy()
    for data, label in data_iterator:
        output = net(data)
        predictions = nd.argmax(output, axis=1)
        predictions = predictions.reshape((-1, 1))
        acc.update(preds=predictions, labels=label)
    return acc.get()[1]