code: def _kernel_tv_tensor_wrapper(kernel):
      @functools.wraps(kernel)
      def wrapper(inpt, *args, **kwargs):
          # If you're wondering whether we could / should get rid of this wrapper,
          # the answer is no: we want to pass pure Tensors to avoid the overhead
          # of the __torch_function__ machinery. Note that this is always valid,
          # regardless of whether we override __torch_function__ in our base class
          # or not.
          # Also, even if we didn't call `as_subclass` here, we would still need
          # this wrapper to call wrap(), because the TVTensor type would be
          # lost after the first operation due to our own __torch_function__
          # logic.
          output = kernel(
              inpt.as_subclass(torch.Tensor), *args, **kwargs
          )
          return tv_tensors.wrap(output, like=inpt)
  
      return wrapper
  
file_path: vision/torchvision/transforms/v2/functional/_utils.py
imports: import functools
  from typing import Any, Callable, Dict, List, Optional, Sequence, Type, Union
  import torch
  from torchvision import tv_tensors
label_desc: Use image node_id 2 for calling a global function with example usage: _kernel_tv_tensor_wrapper(kernel) and returns: wrapper, tv_tensors