code: def testScaleAndTranslateUp(
      self, dtype, image_shape, target_shape, scale, translation, method
  ):
      data = [64, 32, 32, 64, 50, 100]
      # Note zeros occur in the output because the sampling location is outside
      # the boundaries of the input image.
      expected_data = {}
      expected_data["linear"] = [
          0.0,
          0.0,
          0.0,
          0.0,
          56.0,
          40.0,
          32.0,
          0.0,
          52.0,
          44.0,
          40.0,
          0.0,
          44.0,
          52.0,
          56.0,
          0.0,
          45.625,
          63.875,
          73.0,
          0.0,
          56.875,
          79.625,
          91.0,
          0.0,
      ]
      expected_data["lanczos3"] = [
          0.0,
          0.0,
          0.0,
          0.0,
          59.6281,
          38.4313,
          22.23,
          0.0,
          52.0037,
          40.6454,
          31.964,
          0.0,
          41.0779,
          47.9383,
          53.1818,
          0.0,
          43.0769,
          67.1244,
          85.5045,
          0.0,
          56.4713,
          83.5243,
          104.2017,
          0.0,
      ]
      expected_data["lanczos5"] = [
          0.0,
          0.0,
          0.0,
          0.0,
          60.0223,
          40.6694,
          23.1219,
          0.0,
          51.2369,
          39.5593,
          28.9709,
          0.0,
          40.8875,
          46.5604,
          51.7041,
          0.0,
          43.5299,
          67.7223,
          89.658,
          0.0,
          56.784,
          83.984,
          108.6467,
          0.0,
      ]
      expected_data["cubic"] = [
          0.0,
          0.0,
          0.0,
          0.0,
          59.0252,
          36.9748,
          25.8547,
          0.0,
          53.3386,
          41.4789,
          35.4981,
          0.0,
          41.285,
          51.0051,
          55.9071,
          0.0,
          42.151,
          65.8032,
          77.731,
          0.0,
          55.823,
          83.9288,
          98.1026,
          0.0,
      ]
      x = np.array(data, dtype=dtype).reshape(image_shape)
      # Should we test different float types here?
      scale_a = jnp.array(scale, dtype=jnp.float32)
      translation_a = jnp.array(translation, dtype=jnp.float32)
      output = image.scale_and_translate(
          x,
          target_shape,
          range(len(image_shape)),
          scale_a,
          translation_a,
          method,
      )
  
      expected = np.array(expected_data[method], dtype=dtype).reshape(
          target_shape
      )
      self.assertAllClose(output, expected, atol=2e-03)
  
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 6 for calling the ImageTest obj's underlying member method code with example usage: obj.testScaleAndTranslateUp(dtype, image_shape, target_shape, scale, translation, method) without return types