def __rmul__(self, other):
    """ Scalar dual quaternion multiplication.

    The multiplication with a scalar returns the dual quaternion with all
    elements multiplied by the scalar.
    """
    if isinstance(other, Number):
      dq = self.dq.copy()
      dq_out = np.float64(other) * dq
      return DualQuaternion.from_vector(dq_out)
    else:
      assert False, ("Multiplication is only defined for scalars or dual " "quaternions.")
 Scalar dual quaternion multiplication.

    The multiplication with a scalar returns the dual quaternion with all
    elements multiplied by the scalar.
    
hand_eye_calibration/python/hand_eye_calibration/dual_quaternion.py