code: def quaternion_log_to_exp(
      quaternion: Tensor, eps: float = 1.0e-8
  ) -> Tensor:
      r"""Apply exponential map to log quaternion.
  
      The quaternion should be in (w, x, y, z) format.
  
      Args:
          quaternion: a tensor containing a quaternion to be converted.
            The tensor can be of shape :math:`(*, 3)`.
          eps: a small number for clamping.
  
      Return:
          the quaternion exponential map of shape :math:`(*, 4)`.
  
      Example:
          >>> quaternion = tensor((0., 0., 0.))
          >>> quaternion_log_to_exp(quaternion, eps=torch.finfo(quaternion.dtype).eps)
          tensor([1., 0., 0., 0.])
      """
      if not isinstance(quaternion, Tensor):
          raise TypeError(
              f"Input type is not a Tensor. Got {type(quaternion)}"
          )
  
      if not quaternion.shape[-1] == 3:
          raise ValueError(
              f"Input must be a tensor of shape (*, 3). Got {quaternion.shape}"
          )
  
      # compute quaternion norm
      norm_q: Tensor = torch.norm(
          quaternion, p=2, dim=-1, keepdim=True
      ).clamp(min=eps)
  
      # compute scalar and vector
      quaternion_vector: Tensor = quaternion * sin(norm_q) / norm_q
      quaternion_scalar: Tensor = cos(norm_q)
  
      # compose quaternion and return
      quaternion_exp: Tensor = tensor([])
      quaternion_exp = concatenate(
          (quaternion_scalar, quaternion_vector), dim=-1
      )
  
      return quaternion_exp
  
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 19 for calling a global function with example usage: quaternion_log_to_exp(quaternion, eps) and returns: quaternion_exp