code: def _compose_quat(p: jax.Array, q: jax.Array) -> jax.Array:
      cross = jnp.cross(p[:3], q[:3])
      return jnp.array(
          [
              p[3] * q[0] + q[3] * p[0] + cross[0],
              p[3] * q[1] + q[3] * p[1] + cross[1],
              p[3] * q[2] + q[3] * p[2] + cross[2],
              p[3] * q[3] - p[0] * q[0] - p[1] * q[1] - p[2] * q[2],
          ]
      )
  
imports: from __future__ import annotations
  import functools
  import re
  import typing
  import scipy.spatial.transform
  import jax
  import jax.numpy
  from jax._src.numpy.util import _wraps
label_desc: Use image node_id 5 for calling a global function with example usage: _compose_quat(p, q) and returns: jnp