code: def testPassingFDOProfile(self):
      # TODO(jieying): remove after 01/10/2023.
      if not jtu.pjrt_c_api_version_at_least(0, 34):
          raise unittest.SkipTest(
              "Profiler is not supported on PJRT C API version < 0.34."
          )
      mesh = jtu.create_global_mesh((2,), ("x",))
  
      @partial(
          jax.jit,
          in_shardings=NamedSharding(
              mesh,
              P(
                  "x",
              ),
          ),
          out_shardings=NamedSharding(
              mesh,
              P(
                  "x",
              ),
          ),
      )
      def f(x, y):
          z = x @ y
          return z @ y
  
      shape = (8, 8)
      x = jnp.arange(math.prod(shape)).reshape(shape).astype(np.float32)
      y = x + 1
      f_lowered = f.lower(x, y)
      compiled = f_lowered.compile()
  
      with tempfile.TemporaryDirectory() as tmpdir:
          jax.profiler.start_trace(tmpdir)
          compiled(x, y)
          jax.profiler.stop_trace()
          directories = glob.glob(
              os.path.join(tmpdir, "plugins/profile/**/")
          )
          directories = [d for d in directories if os.path.isdir(d)]
          rundir = directories[-1]
          logging.info("rundir: %s", rundir)
          fdo_profile = exp_profiler.get_profiled_instructions_proto(
              rundir
          )
  
      if jtu.test_device_matches(["gpu"]) and jtu.is_device_cuda():
          self.assertIn(b"custom", fdo_profile)
  
      logging.info("fdo_profile: %s", fdo_profile)
      # Test pass fdo_profile as compiler_options API works.
      f_lowered.compile(compiler_options={"fdo_profile": fdo_profile})
  
file_path: jax/tests/pgle_test.py
imports: from functools import partial
  import glob
  import logging
  import math
  import os
  import tempfile
  import unittest
  from absl.testing import absltest
  import jax
  from jax import config
  from jax._src import test_util
  from jax.sharding import NamedSharding
  from jax.experimental import profiler
  import jax.numpy
  from jax.sharding import PartitionSpec
  import numpy
label_desc: Use image node_id 1 for calling the PgleTest obj's underlying member method code with example usage: obj.testPassingFDOProfile() and returns: unknown