code: def test_loss():
      """test with invalid loss"""
      net = _get_test_network()
      device = mx.cpu()
      acc = mx.gluon.metric.Accuracy()
      net.initialize(device=device)
      trainer = gluon.Trainer(
          net.collect_params(), "sgd", {"learning_rate": 0.001}
      )
      # input invalid loss
      with pytest.raises(ValueError):
          est = Estimator(
              net=net,
              loss="mse",
              train_metrics=acc,
              trainer=trainer,
              device=device,
          )
  
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 8 for calling a global function with example usage: test_loss() without return types