code: def testMapCoordinates(
      self,
      shape,
      dtype,
      coords_shape,
      coords_dtype,
      order,
      mode,
      cval,
      impl,
      round_,
      rng_factory,
  ):
      def args_maker():
          x = np.arange(math.prod(shape), dtype=dtype).reshape(shape)
          coords = [
              (size - 1) * rng(coords_shape, coords_dtype)
              for size in shape
          ]
          if round_:
              coords = [c.round().astype(int) for c in coords]
          return x, coords
  
      rng = rng_factory(self.rng())
      lsp_op = lambda x, c: lsp_ndimage.map_coordinates(
          x, c, order=order, mode=mode, cval=cval
      )
      impl_fun = (
          osp_ndimage.map_coordinates
          if impl == "original"
          else _fixed_ref_map_coordinates
      )
      osp_op = lambda x, c: impl_fun(
          x, c, order=order, mode=mode, cval=cval
      )
  
      with jtu.strict_promotion_if_dtypes_match(
          [dtype, int if round else coords_dtype]
      ):
          if dtype in float_dtypes:
              epsilon = max(
                  dtypes.finfo(dtypes.canonicalize_dtype(d)).eps
                  for d in [dtype, coords_dtype]
              )
              self._CheckAgainstNumpy(
                  osp_op, lsp_op, args_maker, tol=100 * epsilon
              )
          else:
              self._CheckAgainstNumpy(osp_op, lsp_op, args_maker, tol=0)
  
file_path: jax/tests/scipy_ndimage_test.py
imports: from functools import partial
  import math
  import numpy
  from absl.testing import absltest
  import scipy.ndimage
  from jax import grad
  from jax._src import test_util
  from jax import dtypes
  from jax.scipy import ndimage
  from jax import config
label_desc: Use image node_id 1 for calling the NdimageTest obj's underlying member method code with example usage: obj.testMapCoordinates(shape, dtype, coords_shape, coords_dtype, order, mode, cval, impl, round_, rng_factory) and returns: x,  coords