code: def test_new_requires_grad(
      data, input_requires_grad, expected_requires_grad
  ):
      tv_tensor = tv_tensors.Image(
          data, requires_grad=input_requires_grad
      )
      assert tv_tensor.requires_grad is expected_requires_grad
  
imports: from copy import deepcopy
  import pytest
  import torch
  from common_utils import assert_equal, make_bounding_boxes, make_image, make_segmentation_mask, make_video
  from PIL import Image
  from torchvision import tv_tensors
label_desc: Use image node_id 6 for calling a global function with example usage: test_new_requires_grad(data, input_requires_grad, expected_requires_grad) without return types