code: def test_resize_scripted(
      self, dt, size, max_size, interpolation, device
  ):
      tensor, _ = _create_data(height=34, width=36, device=device)
      batch_tensors = torch.randint(
          0, 256, size=(4, 3, 44, 56), dtype=torch.uint8, device=device
      )
  
      if dt is not None:
          # This is a trivial cast to float of uint8 data to test all cases
          tensor = tensor.to(dt)
      if max_size is not None and len(size) != 1:
          pytest.skip(
              "Size should be an int or a sequence of length 1 if max_size is specified"
          )
  
      transform = T.Resize(
          size=size,
          interpolation=interpolation,
          max_size=max_size,
          antialias=True,
      )
      s_transform = torch.jit.script(transform)
      _test_transform_vs_scripted(transform, s_transform, tensor)
      _test_transform_vs_scripted_on_batch(
          transform, s_transform, batch_tensors
      )
  
imports: import os
  import sys
  import numpy
  import PIL.Image
  import pytest
  import torch
  from common_utils import _assert_approx_equal_tensor_to_pil, _assert_equal_tensor_to_pil, _create_data, _create_data_batch, assert_equal, cpu_and_cuda, float_dtypes, get_tmp_dir, int_dtypes
  from torchvision import transforms
  from torchvision.transforms import functional, InterpolationMode
  from torchvision.transforms.autoaugment import _apply_op
label_desc: Use image node_id 2 for calling the TestResize obj's underlying member method code with example usage: obj.test_resize_scripted(dt, size, max_size, interpolation, device) without return types