code: def test_batch_processor_validation():
      """test different validation data types"""
      net = _get_test_network()
      dataloader, dataiter = _get_test_data()
      num_epochs = 1
      device = mx.cpu()
      loss = gluon.loss.L2Loss()
      acc = mx.gluon.metric.Accuracy()
      val_loss = gluon.loss.L1Loss()
      net.initialize(device=device)
      processor = BatchProcessor()
      trainer = gluon.Trainer(
          net.collect_params(), "sgd", {"learning_rate": 0.001}
      )
      est = Estimator(
          net=net,
          loss=loss,
          train_metrics=acc,
          trainer=trainer,
          device=device,
          val_loss=val_loss,
          batch_processor=processor,
      )
      # Input dataloader
      est.fit(
          train_data=dataloader, val_data=dataloader, epochs=num_epochs
      )
  
      # using validation handler
      train_metrics = est.train_metrics
      val_metrics = est.val_metrics
      validation_handler = ValidationHandler(
          val_data=dataloader, eval_fn=est.evaluate
      )
  
      with pytest.raises(ValueError):
          est.fit(
              train_data=dataiter, val_data=dataiter, epochs=num_epochs
          )
      # Input NDArray
      with pytest.raises(ValueError):
          est.fit(
              train_data=[mx.nd.ones(shape=(10, 3))],
              val_data=[mx.nd.ones(shape=(10, 3))],
              epochs=num_epochs,
          )
  
file_path: mxnet/tests/python/unittest/test_gluon_batch_processor.py
imports: import sys
  import unittest
  import warnings
  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 *
  from mxnet.gluon.contrib.estimator.batch_processor import BatchProcessor
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_batch_processor_validation() without return types