code: def evaluate_network(network, data_iterator, ctx):
      loss_acc = 0.0
      l2 = gluon.loss.L2Loss()
      for idx, (users, items, scores) in enumerate(data_iterator):
          users_ = gluon.utils.split_and_load(users, ctx)
          items_ = gluon.utils.split_and_load(items, ctx)
          scores_ = gluon.utils.split_and_load(scores, ctx)
          preds = [network(u, i) for u, i in zip(users_, items_)]
          losses = [l2(p, s).asnumpy() for p, s in zip(preds, scores_)]
          loss_acc += sum(losses).mean() / len(ctx)
      return loss_acc / (idx + 1)
  
imports: import logging
  import math
  import random
  import mxnet
  from mxnet import gluon, autograd, nd
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: evaluate_network(network, data_iterator, ctx) and returns: unknown