code: def combined_named_parameters(*parameters):
      """Combines multiple ``@parameterized.named_parameters`` compatible sequences.
  
      >>> foos = ("a_for_foo", "a"), ("b_for_foo", "b")
      >>> bars = ("c_for_bar", "c"), ("d_for_bar", "d")
  
      >>> @named_parameters(foos)
      ... def testFoo(self, foo):
      ...   assert foo in ("a", "b")
  
      >>> @combined_named_parameters(foos, bars):
      ... def testFooBar(self, foo, bar):
      ...   assert foo in ("a", "b")
      ...   assert bar in ("c", "d")
  
      Args:
        *parameters: A sequence of parameters that will be combined and be passed
          into ``parameterized.named_parameters``.
  
      Returns:
        A test generator to be handled by ``parameterized.TestGeneratorMetaclass``.
      """
      combine = lambda a, b: ("_".join((a[0], b[0])),) + a[1:] + b[1:]
      return parameterized.named_parameters(
          functools.reduce(combine, r)
          for r in itertools.product(*parameters)
      )
  
file_path: dm-haiku/haiku/_src/test_utils.py
imports: from collections.abc import Generator, Sequence
  import functools
  import inspect
  import itertools
  import os
  import types
  from typing import Any, Callable, Optional, TypeVar
  from absl.testing import parameterized
  from haiku._src import config
  from haiku._src import transform
  import jax
label_desc: Use image node_id 4 for calling a global function with example usage: combined_named_parameters() and returns: parameterized