code: def test_rms():
      opt1 = mx.optimizer.RMSProp
      opt2 = mx.optimizer.RMSProp
      shapes = [(3, 4, 5), (10, 4), (7,)]
      rho_options = [{}, {"rho": 0.5}]
      cg_options = [{}, {"clip_gradient": 0.4}]
      cw_options = [{}, {"clip_weights": 0.01}]
      center_options = [{"centered": False}, {"centered": True}]
      rg_options = [{}, {"rescale_grad": 0.14}]
      wd_options = [{}, {"wd": 0.03}]
      mom_options = [{"momentum": 0.0}, {"momentum": 0.9}]
      mp_options = [
          {"multi_precision": False},
          {"multi_precision": True},
      ]
      agg_options = [
          {"aggregate_num": 0},
          {"aggregate_num": 1},
          {"aggregate_num": 4},
          {"aggregate_num": np.inf},
      ]
      for dtype in [np.float16, np.float32]:
          # Reduce foating point compare tolerance to avoid flaky test failure.
          rtol, atol = (
              (1e-1, 1e-1) if dtype is np.float16 else (1e-2, 1e-2)
          )
  
          for params in itertools.product(
              rho_options,
              cg_options,
              cw_options,
              center_options,
              rg_options,
              wd_options,
              mom_options,
              mp_options,
              agg_options,
          ):
              kwarg = {
                  k: v for param in params for k, v in param.items()
              }
              if dtype == np.float16 and (
                  "multi_precision" not in kwarg
                  or not kwarg["multi_precision"]
              ):
                  continue
              compare_optimizer(
                  opt1(use_fused_step=False, **kwarg),
                  opt2(use_fused_step=True, **kwarg),
                  shapes,
                  dtype,
                  rtol=rtol,
                  atol=atol,
              )
              if default_device() == mx.cpu():
                  compare_optimizer(
                      opt1(use_fused_step=False, **kwarg),
                      opt2(use_fused_step=True, **kwarg),
                      shapes,
                      dtype,
                      g_stype="row_sparse",
                      rtol=rtol,
                      atol=atol,
                  )
  
imports: import itertools
  import numpy
  import itertools
  import mxnet
  import mxnet.lr_scheduler
  from mxnet import gluon
  import unittest
  import pytest
  import math
  from mxnet.test_utils import *
  from common import retry, xfail_when_nonstandard_decimal_separator
label_desc: Use image node_id 16 for calling a global function with example usage: test_rms() without return types