code: def test_resize_asserts(device):
      tensor, pil_img = _create_data(26, 36, device=device)
  
      res1 = F.resize(tensor, size=32, interpolation=PIL.Image.BILINEAR)
      res2 = F.resize(tensor, size=32, interpolation=BILINEAR)
      assert_equal(res1, res2)
  
      for img in (tensor, pil_img):
          exp_msg = "max_size should only be passed if size specifies the length of the smaller edge"
          with pytest.raises(ValueError, match=exp_msg):
              F.resize(img, size=(32, 34), max_size=35)
          with pytest.raises(
              ValueError, match="max_size = 32 must be strictly greater"
          ):
              F.resize(img, size=32, max_size=32)
  
imports: import colorsys
  import itertools
  import math
  import os
  from functools import partial
  from typing import Sequence
  import numpy
  import PIL.Image
  import pytest
  import torch
  import torchvision.transforms
  import torchvision.transforms._functional_pil
  import torchvision.transforms._functional_tensor
  import torchvision.transforms.functional
  from common_utils import _assert_approx_equal_tensor_to_pil, _assert_equal_tensor_to_pil, _create_data, _create_data_batch, _test_fn_on_batch, assert_equal, cpu_and_cuda, needs_cuda
  from torchvision.transforms import InterpolationMode
label_desc: Use image node_id 8 for calling a global function with example usage: test_resize_asserts(device) without return types