code: def _compose_quat(p, q):
      product = np.empty((max(p.shape[0], q.shape[0]), 4))
      product[:, 3] = p[:, 3] * q[:, 3] - np.sum(
          p[:, :3] * q[:, :3], axis=1
      )
      product[:, :3] = (
          p[:, None, 3] * q[:, :3]
          + q[:, None, 3] * p[:, :3]
          + np.cross(p[:, :3], q[:, :3])
      )
      return product
  
imports: from __future__ import division, print_function, absolute_import
  import re
  import warnings
  import numpy
  import scipy.linalg
  from scipy._lib._util import check_random_state
label_desc: Use image node_id 4 for calling a global function with example usage: _compose_quat(p, q) and returns: product