code: def test_nested_jit_metadata(self):
      @jax.jit
      def foo(x):
          return jnp.sin(x)
  
      def bar(x):
          return jnp.cos(foo(x))
  
      _ = bar(1.0)
      assert self.op_types[-2] == "sin"
      assert self.op_names[-2] == "jit(foo)/sin"
      assert self.op_types[-1] == "cos"
      assert self.op_names[-1] == "cos"
      _ = jax.jit(bar)(1.0)
      assert self.op_types[-3] == "xla_call"
      assert (
          self.op_names[-3] == "jit(bar)/xla_call[ backend=None\n"
          "                   device=None\n"
          "                   name=foo ]"
      )
      assert self.op_types[-2] == "sin"
      assert self.op_names[-2] == "jit(bar)/jit(foo)/sin"
      assert self.op_types[-1] == "cos"
      assert self.op_names[-1] == "jit(bar)/cos"
  
file_path: jax/tests/metadata_test.py
imports: import io
  import unittest
  from absl.testing import absltest
  from jax._src import test_util
  import jax
  from jax._src import config
  from jax._src.lib.mlir import ir
  from jax import numpy
  from jax import config
label_desc: Use image node_id 2 for calling the MetadataTest obj's underlying member method code with example usage: obj.test_nested_jit_metadata() and returns: jnp, jnp