code: def random(cls):
          
  
          s = np.random.uniform()
          s1 = np.sqrt(1 - s)
          s2 = np.sqrt(s)
          t1 = np.random.uniform(0, 2*np.pi)
          t2 = np.random.uniform(0, 2*np.pi)
  
          w = np.cos(t2)*s2
          x = np.sin(t1)*s1
          y = np.cos(t1)*s1
          z = np.sin(t2)*s2
  
          return cls([w,x,y,z])
docs: Randomly sample a Quaternion from a distribution uniform in
          3D rotation angles.
  
          https://www-preview.ri.cmu.edu/pub_files/pub4/kuffner_james_2004_1/kuffner_james_2004_1.pdf
  
          Returns
          -------
          q : :class:`gala.coordinates.Quaternion`
              A randomly sampled ``Quaternion`` instance.