code: def distance(cls, q0, q1):
          
          q = Quaternion.log_map(q0, q1)
          return q.norm
docs: Quaternion intrinsic distance.
  
          Find the intrinsic geodesic distance between q0 and q1.
  
          Params:
              q0: the first quaternion
              q1: the second quaternion
  
          Returns:
             A positive amount corresponding to the length of the geodesic arc
             connecting q0 to q1.
  
          Note:
             Although the q0^(-1)*q1 != q1^(-1)*q0, the length of the path joining
             them is given by the logarithm of those product quaternions, the norm
             of which is the same.