code: def test_params_or_state(self, params, num_elems):
      def cls():
          for i in range(num_elems):
              g = base.get_parameter if params else base.get_state
              g(f"x{i}", [], init=jnp.zeros)
  
      f = lambda: basic.to_module(cls)(name="foo")()
      invocations = get_summary(f)
      (invocation,) = invocations
      details = invocation.module_details
      d = details.params if params else details.state
      self.assertEqual(list(d), [f"foo/x{i}" for i in range(num_elems)])
  
imports: from collections.abc import Sequence
  import typing
  from absl.testing import absltest
  from absl.testing import parameterized
  from haiku._src import base
  from haiku._src import basic
  from haiku._src import module
  from haiku._src import summarise
  from haiku._src import test_utils
  from haiku._src import transform
  import jax
  import jax.numpy
label_desc: Use image node_id 4 for calling the SummariseTest obj's underlying member method code with example usage: obj.test_params_or_state(params, num_elems) without return types