code: def from_v_theta(cls, v, theta):
          
          theta = np.asarray(theta)
          v = np.asarray(v)
  
          s = np.sin(0.5 * theta)
          c = np.cos(0.5 * theta)
          vnrm = np.sqrt(np.sum(v * v))
  
          q = np.concatenate([[c], s * v / vnrm])
          return cls(q)
docs: Create a quaternion from unit vector v and rotation angle theta.
  
          Returns
          -------
          q : :class:`gala.coordinates.Quaternion`
              A ``Quaternion`` instance.