class_docstr: Unit test RandomResize.
class_docstr_tok: ["Unit","test","RandomResize","."]
docstr: Test Resize transform by checking shapes, box coordinates, area.
docstr_tok: ["Test","Resize","transform","by","checking","shapes",",","box","coordinates",",","area","."]
code: def test_resize_transform(self):
      """Test Resize transform by checking shapes, box coordinates, area."""
      features = fake_decoded_features(7, 5, 4)
      features["label"]["boxes"] = tf.constant(
          [[1.0, 3.0, 3.0, 4.0], [2.0, 0.0, 3.0, 3.0]], dtype=tf.float32
      )
      features["label"]["area"] = tf.constant(
          [2.0, 3.0], dtype=tf.float32
      )
  
      transform = transforms.Resize(12, max_size=10)
      features_resized = transform(features)
  
      # checks resized shape
      self.assertSequenceEqual(
          features_resized["inputs"].shape, [10, 8, 3]
      )
  
      # checks resized boxes
      expected_boxes = np.array(
          [[2.0, 6.0, 6.0, 8.0], [4.0, 0.0, 6.0, 6.0]], dtype=np.float32
      )
      np.testing.assert_allclose(
          features_resized["label"]["boxes"].numpy(), expected_boxes
      )
  
      # checks resized object area
      expected_areas = np.array([8.0, 12.0], dtype=np.float32)
      np.testing.assert_allclose(
          features_resized["label"]["area"].numpy(), expected_areas
      )
  
imports: import copy
  from absl.testing import absltest
  from absl.testing import parameterized
  import numpy
  from scenic.projects.baselines.detr import transforms
  import tensorflow
label_desc: Use image node_id 2 for calling the RandomResizeTest obj's underlying member method code with example usage: obj.test_resize_transform() without return types