code: def motion_blur3d(
      input: Tensor,
      kernel_size: int,
      angle: tuple[float, float, float] | Tensor,
      direction: float | Tensor,
      border_type: str = "constant",
      mode: str = "nearest",
  ) -> Tensor:
      r"""Perform motion blur on 3D volumes (5D tensor).
  
      Args:
          input: the input tensor with shape :math:`(B, C, D, H, W)`.
          kernel_size: motion kernel width, height and depth. It should be odd and positive.
          angle: Range of yaw (x-axis), pitch (y-axis), roll (z-axis) to select from.
              If tensor, it must be :math:`(B, 3)`.
          direction: forward/backward direction of the motion blur.
              Lower values towards -1.0 will point the motion blur towards the back (with angle provided via angle),
              while higher values towards 1.0 will point the motion blur forward. A value of 0.0 leads to a
              uniformly (but still angled) motion blur.
              If tensor, it must be :math:`(B,)`.
          border_type: the padding mode to be applied before convolving. The expected modes are:
              ``'constant'``, ``'reflect'``, ``'replicate'`` or ``'circular'``. Default: ``'constant'``.
          mode: interpolation mode for rotating the kernel. ``'bilinear'`` or ``'nearest'``.
  
      Return:
          the blurred image with shape :math:`(B, C, D, H, W)`.
  
      Example:
          >>> input = torch.randn(1, 3, 120, 80, 90).repeat(2, 1, 1, 1, 1)
          >>> # perform exact motion blur across the batch
          >>> out_1 = motion_blur3d(input, 5, (0., 90., 90.), 1)
          >>> torch.allclose(out_1[0], out_1[1])
          True
          >>> # perform element-wise motion blur across the batch
          >>> out_1 = motion_blur3d(input, 5, torch.tensor([[0., 90., 90.], [90., 180., 0.]]), torch.tensor([1., -1.]))
          >>> torch.allclose(out_1[0], out_1[1])
          False
      """
      kernel = get_motion_kernel3d(kernel_size, angle, direction, mode)
      return filter3d(input, kernel, border_type)
  
file_path: kornia/kornia/filters/motion.py
imports: from __future__ import annotations
  from kornia.core import Module, Tensor
  from kornia.core.check import KORNIA_CHECK
  from .filter import filter2d, filter3d
  from .kernels_geometry import get_motion_kernel2d, get_motion_kernel3d
label_desc: Use image node_id 2 for calling a global function with example usage: motion_blur3d(input, kernel_size, angle, direction, border_type, mode) and returns: filter3d