code: def test_validation_handler():
      test_data = _get_test_data()
  
      net = _get_test_network()
      ce_loss = loss.SoftmaxCrossEntropyLoss()
      acc = mx.gluon.metric.Accuracy()
      est = estimator.Estimator(net, loss=ce_loss, train_metrics=acc)
      val_handler = ValidationHandler(
          val_data=test_data,
          eval_fn=est.evaluate,
          event_handlers=Handler(),
      )
  
      est.fit(
          train_data=test_data,
          val_data=test_data,
          event_handlers=[val_handler],
          epochs=2,
      )
      assert est.run_test_handler == True
  
imports: import os
  import logging
  import sys
  import re
  import mxnet
  from common import TemporaryDirectory
  from mxnet import np
  from mxnet.gluon import nn, loss
  from mxnet.gluon.contrib.estimator import estimator, event_handler
  from mxnet.gluon.contrib.estimator.event_handler import LoggingHandler
  from mxnet.gluon.contrib.estimator.event_handler import ValidationHandler
  from mxnet.gluon.contrib.estimator import EpochEnd
  from mxnet.gluon.data.dataset import Dataset
label_desc: Use image node_id 11 for calling a global function with example usage: test_validation_handler() without return types