code: def test__extract_image_targets(self, image_type, label_type, mocker):
      transform = transforms.SimpleCopyPaste()
  
      flat_sample = [
          # images, batch size = 2
          self.create_fake_image(mocker, image_type),
          self.create_fake_image(mocker, image_type),
          # labels, bboxes, masks
          mocker.MagicMock(spec=label_type),
          mocker.MagicMock(spec=BoundingBoxes),
          mocker.MagicMock(spec=Mask),
          # labels, bboxes, masks
          mocker.MagicMock(spec=label_type),
          mocker.MagicMock(spec=BoundingBoxes),
          mocker.MagicMock(spec=Mask),
      ]
  
      images, targets = transform._extract_image_targets(flat_sample)
  
      assert len(images) == len(targets) == 2
      if image_type == PIL.Image.Image:
          torch.testing.assert_close(
              images[0], pil_to_tensor(flat_sample[0])
          )
          torch.testing.assert_close(
              images[1], pil_to_tensor(flat_sample[1])
          )
      else:
          assert images[0] == flat_sample[0]
          assert images[1] == flat_sample[1]
  
      for target in targets:
          for key, type_ in [
              ("boxes", BoundingBoxes),
              ("masks", Mask),
              ("labels", label_type),
          ]:
              assert key in target
              assert isinstance(target[key], type_)
              assert target[key] in flat_sample
  
imports: import collections.abc
  import re
  import PIL.Image
  import pytest
  import torch
  from common_utils import assert_equal, make_bounding_boxes, make_detection_masks, make_image, make_video
  from torchvision.prototype import transforms, tv_tensors
  from torchvision.transforms.v2._utils import check_type, is_pure_tensor
  from torchvision.transforms.v2.functional import clamp_bounding_boxes, InterpolationMode, pil_to_tensor, to_pil_image
  from torchvision.tv_tensors import BoundingBoxes, BoundingBoxFormat, Image, Mask, Video
  import importlib.machinery
  import importlib.util
  from pathlib import Path
label_desc: Use image node_id 3 for calling the TestSimpleCopyPaste obj's underlying member method code with example usage: obj.test__extract_image_targets(image_type, label_type, mocker) without return types