code: def test_lion(seed, lr, beta1, beta2, decay, ctx, solver_name):
      rng = np.random.RandomState(seed)
  
      def _hook(itr, sol, ref_sol):
          ref_m = ref_sol.m
          act_m = {
              k: v.pstate["m"].data.get_data("r")
              for k, v in sol.get_states().items()
          }
          print(f"---- iter={itr} ----")
          for k, ref in ref_m.items():
              act = act_m[k]
              print(f"[{k}]")
              print(f"ref={ref}")
              print(f"act={act}")
  
      _hook = None
  
      solver_tester(
          rng,
          S.Lion,
          RefLion,
          [lr, beta1, beta2],
          atol=1e-6,
          decay=decay,
          ctx=ctx,
          solver_name=solver_name,
          hook_solver_update=_hook,
      )
  
file_path: nnabla/python/test/solver/test_lion.py
imports: import pytest
  import nnabla.solvers
  import numpy
  from solver_test_utils import solver_tester, RefSolver, MixinWeightDecayFused
  from nbla_test_utils import list_context
label_desc: Use image node_id 3 for calling a global function with example usage: test_lion(seed, lr, beta1, beta2, decay, ctx, solver_name) without return types