code: def geodesic_logeuclid(A, B, alpha=0.5):
      r"""Log-Euclidean geodesic between SPD/HPD matrices.
  
      The matrix at position :math:`\alpha` on the Log-Euclidean geodesic
      between two SPD/HPD matrices :math:`\mathbf{A}` and :math:`\mathbf{B}` is:
  
      .. math::
          \mathbf{C} = \exp \left( (1-\alpha) \log(\mathbf{A})
                       + \alpha \log(\mathbf{B}) \right)
  
      :math:`\mathbf{C}` is equal to :math:`\mathbf{A}` if :math:`\alpha` = 0,
      and :math:`\mathbf{B}` if :math:`\alpha` = 1.
  
      Parameters
      ----------
      A : ndarray, shape (..., n, n)
          First SPD/HPD matrices.
      B : ndarray, shape (..., n, n)
          Second SPD/HPD matrices.
      alpha : float, default=0.5
          The position on the geodesic.
  
      Returns
      -------
      C : ndarray, shape (..., n, n)
          SPD/HPD matrices on the Log-Euclidean geodesic.
      """
      return expm((1 - alpha) * logm(A) + alpha * logm(B))
  
imports: from .base import sqrtm, invsqrtm, powm, logm, expm
label_desc: Use image node_id 2 for calling a global function with example usage: geodesic_logeuclid(A, B, alpha) and returns: expm