code: def test_amp_basic_use(lp_dtype):
      class TestNet(nn.HybridBlock):
          def __init__(self):
              super().__init__()
              self.fc1 = nn.Dense(4)
              self.fc2 = nn.Dense(4)
  
          def forward(self, x):
              x = self.fc1(x)
              x = self.fc2(x)
              return x.reshape((-1, 2, 2))
  
      data_example = mx.np.random.uniform(-1, 1, (4, 4))
  
      net = TestNet()
      net.initialize()
      net = amp.convert_hybrid_block(net, data_example, lp_dtype)
  
      lp16_casts = 1  # cast for network input
      lp16_casts += 2  # cast for weights and bias of `fc1`
      lp16_casts += 2  # cast for weights and bias of `fc2`
  
      other_casts = 1  # cast for the network output (from lp16 to f32)
  
      lp16_tensors = 1  # cast network input
      lp16_tensors += 3  # cast weights and bias of `fc1`, `fc1` output
      lp16_tensors += 3  # cast weights and bias of `fc2`, `fc2` output
      lp16_tensors += 1  # reshape output
      check_amp_net_stats(
          lp_dtype,
          net,
          data_example,
          lp16_tensors_num=lp16_tensors,
          lp16_casts_num=lp16_casts,
          other_casts_num=other_casts,
      )
  
file_path: mxnet/tests/python/amp/common.py
imports: import warnings
  import collections
  import mxnet
  from mxnet import amp
  from mxnet.gluon import nn
  from mxnet.operator import get_all_registered_operators_grouped
label_desc: Use image node_id 2 for calling a global function with example usage: test_amp_basic_use(lp_dtype) and returns: x