code: def test_val_handlers():
      net = _get_test_network()
      train_data, _ = _get_test_data()
      val_data, _ = _get_test_data()
  
      num_epochs = 1
      device = mx.cpu()
      net.initialize(device=device)
      trainer = gluon.Trainer(
          net.collect_params(), "sgd", {"learning_rate": 0.001}
      )
  
      train_acc = mx.gluon.metric.RMSE()
      loss = gluon.loss.L2Loss()
  
      est = Estimator(
          net=net,
          loss=loss,
          train_metrics=train_acc,
          trainer=trainer,
          device=device,
      )
  
      with warnings.catch_warnings(record=True) as w:
          est.fit(train_data=train_data, epochs=num_epochs)
          est.evaluate(val_data=val_data)
  
      logging = LoggingHandler(log_interval=1, metrics=est.val_metrics)
      est.evaluate(val_data=val_data, event_handlers=[logging])
  
imports: import sys
  import unittest
  import warnings
  import pytest
  import mxnet
  from mxnet import gluon
  from mxnet.gluon import nn
  from mxnet.gluon.contrib.estimator import *
  from mxnet.gluon.contrib.estimator.event_handler import *
label_desc: Use image node_id 13 for calling a global function with example usage: test_val_handlers() without return types