code: def testResizeAgainstTensorFlow(
      self, dtype, image_shape, target_shape, method, antialias
  ):
      # TODO(phawkins): debug this. There is a small mismatch between TF and JAX
      # for some cases of non-antialiased bicubic downscaling; we would expect
      # exact equality.
      if method == "bicubic" and not antialias:
          raise unittest.SkipTest(
              "non-antialiased bicubic downscaling mismatch"
          )
      rng = jtu.rand_default(self.rng())
      args_maker = lambda: (rng(image_shape, dtype),)
  
      def tf_fn(x):
          out = (
              tf.image.resize(
                  x.astype(np.float64),
                  tf.constant(target_shape[1:-1]),
                  method=method,
                  antialias=antialias,
              )
              .numpy()
              .astype(dtype)
          )
          return out
  
      jax_fn = partial(
          image.resize,
          shape=target_shape,
          method=method,
          antialias=antialias,
      )
      self._CheckAgainstNumpy(
          tf_fn,
          jax_fn,
          args_maker,
          check_dtypes=True,
          tol={
              np.float16: 2e-2,
              jnp.bfloat16: 1e-1,
              np.float32: 1e-4,
              np.float64: 1e-4,
          },
      )
  
imports: from functools import partial
  import unittest
  import numpy
  from absl.testing import absltest
  import jax
  from jax import image
  from jax import numpy
  from jax._src import test_util
  from jax import config
label_desc: Use image node_id 1 for calling the ImageTest obj's underlying member method code with example usage: obj.testResizeAgainstTensorFlow(dtype, image_shape, target_shape, method, antialias) and returns: out