code: def celeba_wrapper_factory(dataset, target_keys):
      if any(
          target_type in dataset.target_type
          for target_type in ["attr", "landmarks"]
      ):
          raise_not_supported(
              "`CelebA` dataset with `target_type=['attr', 'landmarks', ...]`"
          )
  
      def wrapper(idx, sample):
          image, target = sample
  
          target = wrap_target_by_type(
              target,
              target_types=dataset.target_type,
              type_wrappers={
                  "bbox": lambda item: F.convert_bounding_box_format(
                      tv_tensors.BoundingBoxes(
                          item,
                          format=tv_tensors.BoundingBoxFormat.XYWH,
                          canvas_size=(image.height, image.width),
                      ),
                      new_format=tv_tensors.BoundingBoxFormat.XYXY,
                  ),
              },
          )
  
          return image, target
  
      return wrapper
  
imports: from __future__ import annotations
  import collections.abc
  import contextlib
  from collections import defaultdict
  from copy import copy
  import torch
  from torchvision import datasets, tv_tensors
  from torchvision.transforms.v2 import functional
label_desc: Use image node_id 16 for calling a global function with example usage: celeba_wrapper_factory(dataset, target_keys) and returns: wrapper, image,  target