code: def _validate_input3d(f: Callable[..., Any]) -> Callable[..., Any]:
      r"""Validate the 3D input of the wrapped function.
  
      Args:
          f: a function that takes the first argument as tensor.
  
      Returns:
          the wrapped function after input is validated.
      """
  
      @wraps(f)
      def wrapper(input: Tensor, *args: Any, **kwargs: Any) -> Any:
          if not torch.is_tensor(input):
              raise TypeError(
                  f"Input type is not a Tensor. Got {type(input)}"
              )
  
          input_shape = len(input.shape)
          if input_shape != 5:
              raise AssertionError(
                  f"Expect input of 5 dimensions, got {input_shape} instead"
              )
          _validate_input_dtype(
              input,
              accepted_dtypes=[
                  torch.float16,
                  torch.float32,
                  torch.float64,
              ],
          )
  
          return f(input, *args, **kwargs)
  
      return wrapper
  
imports: from functools import wraps
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
  from torch.distributions import Beta, Uniform
  from kornia.core import Tensor, as_tensor
  from kornia.geometry.boxes import Boxes
  from kornia.geometry.keypoints import Keypoints
  from kornia.utils import _extract_device_dtype
label_desc: Use image node_id 2 for calling a global function with example usage: _validate_input3d(f) and returns: wrapper, f