code: def _transform_input3d(input: Tensor) -> Tensor:
      r"""Reshape an input tensor to be (*, C, D, H, W). Accept either (D, H, W), (C, D, H, W) or (*, C, D, H, W).
      Args:
          input: Tensor
  
      Returns:
          Tensor
      """
      if not torch.is_tensor(input):
          raise TypeError(
              f"Input type is not a Tensor. Got {type(input)}"
          )
  
      if len(input.shape) not in [3, 4, 5]:
          raise ValueError(
              f"Input size must have a shape of either (D, H, W), (C, D, H, W) or (*, C, D, H, W). Got {input.shape}"
          )
  
      if len(input.shape) == 3:
          input = input.unsqueeze(0)
  
      if len(input.shape) == 4:
          input = input.unsqueeze(0)
  
      return input
  
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 6 for calling a global function with example usage: _transform_input3d(input) and returns: input