code: def test_estimator_cpu():
      """
      Test estimator by doing one pass over each model with synthetic data
      """
      models = ["resnet18_v1", "FCN"]
      context = mx.cpu()
      for model_name in models:
          net, input_shape, label_shape, loss_axis = get_net(
              model_name, context
          )
          train_dataset = gluon.data.dataset.ArrayDataset(
              mx.np.random.uniform(size=input_shape),
              mx.np.zeros(shape=label_shape),
          )
          val_dataset = gluon.data.dataset.ArrayDataset(
              mx.np.random.uniform(size=input_shape),
              mx.np.zeros(shape=label_shape),
          )
          loss = gluon.loss.SoftmaxCrossEntropyLoss(axis=loss_axis)
          train_data = gluon.data.DataLoader(
              train_dataset, batch_size=1
          )
          val_data = gluon.data.DataLoader(val_dataset, batch_size=1)
          net.hybridize()
          trainer = gluon.Trainer(
              net.collect_params(), "sgd", {"learning_rate": 0.001}
          )
          # Define estimator
          est = estimator.Estimator(
              net=net,
              loss=loss,
              train_metrics=mx.gluon.metric.Accuracy(),
              trainer=trainer,
              context=context,
          )
          # Call fit()
          est.fit(train_data=train_data, val_data=val_data, epochs=1)
  
file_path: mxnet/tests/nightly/estimator/test_estimator_cnn.py
imports: import os
  import sys
  import mxnet
  import numpy
  from mxnet import gluon, init, nd
  from mxnet.gluon import data
  from mxnet.gluon.contrib.estimator import estimator
  from mxnet.gluon.model_zoo import vision
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_estimator_cpu() without return types