code: def test_ignore_regex(self):
      def f():
          return basic.Linear(output_size=2, b_init=jnp.ones)(
              jnp.zeros([6])
          )
  
      init_fn, _ = transform.transform(f)
      params = init_fn(random.PRNGKey(428))
  
      def g(x):
          return moving_averages.EMAParamsTree(0.2, ignore_regex=".*w")(
              x
          )
  
      init_fn, apply_fn = multi_transform.without_apply_rng(
          transform.transform_with_state(g)
      )
      _, params_state = init_fn(None, params)
      params, params_state = apply_fn(None, params_state, params)
      # Let's modify our params.
      changed_params = tree.map_structure(lambda t: 2.0 * t, params)
      ema_params, params_state = apply_fn(
          None, params_state, changed_params
      )
  
      # W should be the same!
      # ... but b should have changed!
      self.assertTrue(
          (
              changed_params["linear"]["b"] != ema_params["linear"]["b"]
          ).all()
      )
      self.assertTrue(
          (
              changed_params["linear"]["w"] == ema_params["linear"]["w"]
          ).all()
      )
  
imports: from absl.testing import absltest
  from absl.testing import parameterized
  from haiku._src import basic
  from haiku._src import moving_averages
  from haiku._src import multi_transform
  from haiku._src import test_utils
  from haiku._src import transform
  import jax
  import jax.numpy
  import jax.random
  import numpy
  import tree
label_desc: Use image node_id 3 for calling the EMAParamsTreeTest obj's underlying member method code with example usage: obj.test_ignore_regex() and returns: basic, moving_averages