code: def test_vmap_of_grad_of_cond_transforms_name_stack(self):
      @functools.partial(jax.vmap, in_axes=(0, None))
      @jax.grad
      @jax.named_scope("foo")
      def f(x, y):
          @jax.named_scope("true")
          def true_fn(x):
              return x * x * 2.0
  
          @jax.named_scope("false")
          def false_fn(x):
              return x / x / 2.0
  
          return lax.cond(y, true_fn, false_fn, x)
  
      jaxpr = jax.make_jaxpr(f)(jnp.arange(2.0), True)
      self.assertEqual(
          str(jaxpr.eqns[1].source_info.name_stack), "vmap(jvp(foo))"
      )
      self.assertEqual(
          str(jaxpr.eqns[2].source_info.name_stack),
          "vmap(transpose(jvp(foo)))",
      )
  
      hlo_text = _get_hlo(f)(jnp.arange(2.0), True)
      self.assertIn(
          "vmap(jvp(foo))/cond/branch_0_fun/false/div", hlo_text
      )
      self.assertIn(
          "vmap(jvp(foo))/cond/branch_1_fun/true/mul", hlo_text
      )
      self.assertIn(
          "vmap(transpose(jvp(foo)))/cond/branch_0_fun/false/div",
          hlo_text,
      )
      self.assertIn(
          "vmap(transpose(jvp(foo)))/cond/branch_1_fun/true/mul",
          hlo_text,
      )
  
imports: import functools
  from absl.testing import absltest
  import jax
  import jax.numpy
  from jax._src import core
  from jax import lax
  from jax._src.pjit import pjit
  from jax._src import linear_util
  from jax import config
  from jax._src import test_util
  from jax._src.lib import xla_client
label_desc: Use image node_id 10 for calling the NameStackControlFlowTest obj's underlying member method code with example usage: obj.test_vmap_of_grad_of_cond_transforms_name_stack() and returns: lax, unknown, unknown