code: def test_repeat_agg(self, same_inputs, n, layer):
      rng_input, rng_params, rng_p1, rng_p2 = random.split(
          random.PRNGKey(1), 4
      )
      x1 = jnp.cos(random.normal(rng_input, (2, 4, 3, 3)))
      x2 = (
          None
          if same_inputs
          else random.normal(rng_input, (4, 4, 3, 3))
      )
  
      p1 = random.normal(rng_p1, x1.shape[:-1] + x1.shape[1:-1])
      p2 = (
          p1
          if x2 is None
          else random.normal(rng_p2, x2.shape[:-1] + x2.shape[1:-1])
      )
  
      self._test_repeat(x1, x2, layer, n, rng_params, pattern=(p1, p2))
      self._test_repeat(
          x1, x2, layer, n, rng_params, pattern=(None, None)
      )
  
file_path: neural-tangents/tests/stax/combinators_test.py
imports: import random
  from absl.testing import absltest
  from jax import config
  from jax import random
  import jax.numpy
  from neural_tangents import stax
  from tests import test_utils
label_desc: Use image node_id 4 for calling the RepeatTest obj's underlying member method code with example usage: obj.test_repeat_agg(same_inputs, n, layer) without return types