code: def test_lp16_fp32_ops_order_independence(lp_dtype):
      class TestNet(nn.HybridBlock):
          def __init__(self, lp16_fp32_is_first):
              super().__init__()
              if lp16_fp32_is_first:
                  self.first = mx.npx.batch_flatten  # lp16_fp32_op
                  self.second = nn.Dense(4)
              else:
                  self.first = nn.Dense(4)
                  self.second = mx.npx.batch_flatten  # lp16_fp32_op
  
          def forward(self, x):
              x = 2**x
              x1 = self.first(x)
              x2 = self.second(x)
              return x1, x2
  
      data_example = mx.np.random.uniform(-1, 1, (4, 16))
  
      for lp16_fp32_is_second in [False, True]:
          net = TestNet(lp16_fp32_is_second)
          net.initialize()
          net = amp.convert_hybrid_block(
              net, data_example, lp_dtype, cast_params_offline=True
          )
          check_amp_net_stats(
              lp_dtype,
              net,
              data_example,
              lp16_tensors_num=3,
              lp16_casts_num=1,
              other_casts_num=2,
          )
  
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 5 for calling a global function with example usage: test_lp16_fp32_ops_order_independence(lp_dtype) and returns: x1,  x2