code: def ToAxisAngle(self):
      # recall that for axis-angle representation (a, angle), with "a" unit:
      #   q = (cos(angle/2), a * sin(angle/2))
      # below, for readability, "theta" actually means half of the angle
  
      sin_sq_theta = self.q[1:].dot(self.q[1:])
  
      # if theta is non-zero, then we can compute a unique rotation
      if np.abs(sin_sq_theta) > np.finfo("float").eps:
          sin_theta = np.sqrt(sin_sq_theta)
          cos_theta = self.q[0]
  
          # atan2 is more stable, so we use it to compute theta
          # note that we multiply by 2 to get the actual angle
          angle = 2.0 * (
              np.arctan2(-sin_theta, -cos_theta)
              if cos_theta < 0.0
              else np.arctan2(sin_theta, cos_theta)
          )
  
          return self.q[1:] * (angle / sin_theta)
  
      # otherwise, the result is singular, and we avoid dividing by
      # sin(angle/2) = 0
      return np.zeros(3)
  
imports: import numpy
label_desc: Use image node_id 22 for calling the Quaternion obj's underlying member method code with example usage: obj.ToAxisAngle() and returns: np, unknown