code: def test_gluon_trainer_param_order():
      net = mx.gluon.nn.Sequential()
      # layers may be added in a random order for all workers
      layers = {"ones_": 1, "zeros_": 0}
      for _, init in layers.items():
          net.add(
              mx.gluon.nn.Dense(
                  10,
                  in_units=10,
                  weight_initializer=mx.init.Constant(init),
                  use_bias=False,
              )
          )
      net.initialize()
      params = net.collect_params()
      trainer = gluon.Trainer(params, "sgd")
      for name, _ in layers.items():
          expected_idx = 0 if name == "ones_" else 1
          expected_name = "{}.weight".format(expected_idx)
          assert (
              trainer._params[expected_idx].name
              == params[expected_name].name
          )
  
imports: import mxnet
  import unittest
  import os
  import numpy
  from mxnet import gluon
  from mxnet.gluon import nn
  from mxnet.test_utils import assert_almost_equal
  from common import assertRaises, xfail_when_nonstandard_decimal_separator
  from copy import deepcopy
  import pytest
label_desc: Use image node_id 11 for calling a global function with example usage: test_gluon_trainer_param_order() without return types