code: def test_prim(self, harness: test_harnesses.Harness):
      limitations = Jax2TfLimitation.limitations_for_harness(harness)
      device = jtu.device_under_test()
      limitations = tuple(
          filter(
              lambda l: l.filter(device=device, dtype=harness.dtype),
              limitations,
          )
      )
      func_jax = harness.dyn_fun
      args = harness.dyn_args_maker(self.rng())
      enable_xla = harness.params.get("enable_xla", True)
      if (
          config.jax2tf_default_native_serialization.value
          and not enable_xla
      ):
          raise unittest.SkipTest(
              "native_serialization not supported with enable_xla=False"
          )
  
      if (
          "eigh" == harness.group_name
          and np.complex64 == harness.dtype
          and device == "tpu"
      ):
          raise unittest.SkipTest(
              "b/264716764: error on tf.cast from c64 to f32"
          )
  
      if (
          config.jax2tf_default_native_serialization.value
          and device == "gpu"
          and "lu" in harness.fullname
      ):
          raise unittest.SkipTest("b/269388847: lu failures on GPU")
  
      def skipCustomCallTest(target: str):
          raise unittest.SkipTest(
              f"TODO(b/272239584): custom call target not guaranteed stable: {target}"
          )
  
      if config.jax2tf_default_native_serialization.value:
          if device == "gpu":
              if "custom_linear_solve_" in harness.fullname:
                  skipCustomCallTest(
                      "cusolver_geqrf, cublas_geqrf_batched"
                  )
              if "svd_shape" in harness.fullname:
                  skipCustomCallTest("cusolver_gesvdj")
              if "tridiagonal_solve_shape" in harness.fullname:
                  skipCustomCallTest(
                      "cusparse_gtsv2_f32, cusparse_gtsv2_f64"
                  )
  
      associative_scan_reductions = harness.params.get(
          "associative_scan_reductions", False
      )
      try:
          with jax.jax2tf_associative_scan_reductions(
              associative_scan_reductions
          ):
              self.ConvertAndCompare(
                  func_jax,
                  *args,
                  limitations=limitations,
                  enable_xla=enable_xla,
              )
      except Exception as e:
          # TODO(b/264596006): custom calls are not registered properly with TF in OSS
          if (
              config.jax2tf_default_native_serialization.value
              and "does not work with custom calls" in str(e)
          ):
              logging.warning("Suppressing error %s", e)
              raise unittest.SkipTest(
                  "b/264596006: custom calls in native serialization fail in TF"
              )
          else:
              raise e
  
imports: import datetime
  import os
  from typing import Any
  import unittest
  from absl import logging
  from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  from jax import dtypes
  from jax import numpy
  from jax._src import config
  from jax._src import test_util
  from jax.experimental import jax2tf
  from jax.interpreters import mlir
  from jax._src.interpreters import xla
  import numpy
  import tensorflow
  from jax.experimental.jax2tf.tests import tf_test_util
  from jax.experimental.jax2tf.tests.jax2tf_limitations import Jax2TfLimitation
  from jax._src.internal_test_util import test_harnesses
label_desc: Use image node_id 1 for calling the JaxPrimitiveTest obj's underlying member method code with example usage: obj.test_prim(harness) without return types