code: def test_resize_image(self):
      image = np.random.rand(3, 300, 500)  # rgb image 300x500
      expected_shape = (150, 250)
  
      resized_image, scale, mask_crop = resize_image(
          image,
          image_height=expected_shape[0],
          image_width=expected_shape[1],
      )
  
      original_shape = image.shape[-2:]
      expected_scale = min(
          expected_shape[0] / original_shape[0],
          expected_shape[1] / original_shape[1],
      )
  
      self.assertEqual(scale, expected_scale)
      self.assertEqual(resized_image.shape[-2:], expected_shape)
      self.assertEqual(mask_crop.shape[-2:], expected_shape)
  
file_path: pytorch3d/tests/implicitron/test_bbox.py
imports: import unittest
  import numpy
  import torch
  from pytorch3d.implicitron.dataset.utils import bbox_xywh_to_xyxy, bbox_xyxy_to_xywh, clamp_box_to_image_bounds_and_round, crop_around_box, get_1d_bounds, get_bbox_from_mask, get_clamp_bbox, rescale_bbox, resize_image
  from tests.common_testing import TestCaseMixin
label_desc: Use image node_id 10 for calling the TestBBox obj's underlying member method code with example usage: obj.test_resize_image() without return types