code: def quaternion_from_euler(
      roll: Tensor, pitch: Tensor, yaw: Tensor
  ) -> tuple[Tensor, Tensor, Tensor, Tensor]:
      """Convert Euler angles to quaternion coefficients.
  
      Euler angles are assumed to be in radians in XYZ convention.
  
      Args:
          roll: the roll euler angle.
          pitch: the pitch euler angle.
          yaw: the yaw euler angle.
  
      Return:
          A tuple with quaternion coefficients in order of `wxyz`.
      """
      KORNIA_CHECK(roll.shape == pitch.shape)
      KORNIA_CHECK(pitch.shape == yaw.shape)
  
      roll_half = roll * 0.5
      pitch_half = pitch * 0.5
      yaw_half = yaw * 0.5
  
      cy = yaw_half.cos()
      sy = yaw_half.sin()
      cp = pitch_half.cos()
      sp = pitch_half.sin()
      cr = roll_half.cos()
      sr = roll_half.sin()
  
      qw = cy * cp * cr + sy * sp * sr
      qx = cy * cp * sr - sy * sp * cr
      qy = sy * cp * sr + cy * sp * cr
      qz = sy * cp * cr - cy * sp * sr
  
      return qw, qx, qy, qz
  
imports: from __future__ import annotations
  from typing import Optional
  import torch
  import torch.nn.functional
  from kornia.constants import pi
  from kornia.core import Tensor, concatenate, cos, pad, sin, stack, tensor, where, zeros_like
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_SHAPE
  from kornia.utils import deprecated
  from kornia.utils.helpers import _torch_inverse_cast
label_desc: Use image node_id 24 for calling a global function with example usage: quaternion_from_euler(roll, pitch, yaw) and returns: qw,  qx,  qy,  qz