code: def test_random_resized_crop(self):
      # Test default parameters.
      crop_size = 10
      video = thwc_to_cthw(create_dummy_video_frames(20, 30, 40)).to(
          dtype=torch.float32
      )
  
      transform = RandomResizedCrop(
          target_height=crop_size,
          target_width=crop_size,
          scale=(0.08, 1.0),
          aspect_ratio=(3.0 / 4.0, 4.0 / 3.0),
      )
  
      video_resized = transform(video)
      c, t, h, w = video_resized.shape
      self.assertEqual(c, 3)
      self.assertEqual(t, 20)
      self.assertEqual(h, crop_size)
      self.assertEqual(w, crop_size)
      self.assertEqual(video_resized.dtype, torch.float32)
  
      # Test reversed parameters.
      crop_size = 29
      video = thwc_to_cthw(create_dummy_video_frames(20, 30, 40)).to(
          dtype=torch.float32
      )
  
      transform = RandomResizedCrop(
          target_height=crop_size,
          target_width=crop_size,
          scale=(1.8, 0.08),
          aspect_ratio=(4.0 / 3.0, 3.0 / 4.0),
          shift=True,
      )
  
      video_resized = transform(video)
      c, t, h, w = video_resized.shape
      self.assertEqual(c, 3)
      self.assertEqual(t, 20)
      self.assertEqual(h, crop_size)
      self.assertEqual(w, crop_size)
      self.assertEqual(video_resized.dtype, torch.float32)
  
      # Test one channel.
      crop_size = 10
      video = thwc_to_cthw(create_dummy_video_frames(20, 30, 40)).to(
          dtype=torch.float32
      )
  
      transform = RandomResizedCrop(
          target_height=crop_size,
          target_width=crop_size,
          scale=(1.8, 1.2),
          aspect_ratio=(4.0 / 3.0, 3.0 / 4.0),
      )
  
      video_resized = transform(video[0:1, :, :, :])
      c, t, h, w = video_resized.shape
      self.assertEqual(c, 1)
      self.assertEqual(t, 20)
      self.assertEqual(h, crop_size)
      self.assertEqual(w, crop_size)
      self.assertEqual(video_resized.dtype, torch.float32)
  
      # Test interpolation.
      crop_size = 10
      video = thwc_to_cthw(create_dummy_video_frames(20, 30, 40)).to(
          dtype=torch.float32
      )
  
      transform = RandomResizedCrop(
          target_height=crop_size,
          target_width=crop_size,
          scale=(0.08, 1.0),
          aspect_ratio=(3.0 / 4.0, 4.0 / 3.0),
          interpolation="bicubic",
      )
  
      video_resized = transform(video)
      c, t, h, w = video_resized.shape
      self.assertEqual(c, 3)
      self.assertEqual(t, 20)
      self.assertEqual(h, crop_size)
      self.assertEqual(w, crop_size)
      self.assertEqual(video_resized.dtype, torch.float32)
  
      # Test log_uniform_ratio.
      crop_size = 10
      video = thwc_to_cthw(create_dummy_video_frames(20, 30, 40)).to(
          dtype=torch.float32
      )
  
      transform = RandomResizedCrop(
          target_height=crop_size,
          target_width=crop_size,
          scale=(0.08, 1.0),
          aspect_ratio=(3.0 / 4.0, 4.0 / 3.0),
          log_uniform_ratio=False,
      )
  
      video_resized = transform(video)
      c, t, h, w = video_resized.shape
      self.assertEqual(c, 3)
      self.assertEqual(t, 20)
      self.assertEqual(h, crop_size)
      self.assertEqual(w, crop_size)
      self.assertEqual(video_resized.dtype, torch.float32)
  
imports: import unittest
  from collections import Counter
  from itertools import permutations
  import numpy
  import torch
  from pytorchvideo.data.utils import thwc_to_cthw
  from pytorchvideo.transforms import ApplyTransformToKey, AugMix, create_video_transform, CutMix, MixUp, MixVideo, Normalize, OpSampler, Permute, RandAugment, RandomResizedCrop, RandomShortSideScale, ShortSideScale, UniformCropVideo, UniformTemporalSubsample
  from pytorchvideo.transforms.functional import clip_boxes_to_image, convert_to_one_hot, div_255, horizontal_flip_with_boxes, random_crop_with_boxes, random_short_side_scale_with_boxes, short_side_scale, short_side_scale_with_boxes, uniform_crop, uniform_crop_with_boxes, uniform_temporal_subsample, uniform_temporal_subsample_repeated
  from torchvision.transforms import Compose
  from torchvision.transforms._transforms_video import CenterCropVideo, NormalizeVideo, RandomCropVideo, RandomHorizontalFlipVideo
  from utils import create_dummy_video_frames, create_random_bbox
label_desc: Use image node_id 28 for calling the TestTransforms obj's underlying member method code with example usage: obj.test_random_resized_crop() without return types