code: def get_random_quaternion(n_points=1):
      # https://stackoverflow.com/a/44031492/11011913
      size = (3, n_points) if n_points > 1 else 3
      u, v, w = gs.random.uniform(size=size)
  
      return gs.transpose(
          gs.array(
              [
                  gs.sqrt(1 - u) * gs.sin(2 * gs.pi * v),
                  gs.sqrt(1 - u) * gs.cos(2 * gs.pi * v),
                  gs.sqrt(u) * gs.sin(2 * gs.pi * w),
                  gs.sqrt(u) * gs.cos(2 * gs.pi * w),
              ]
          )
      )
  
imports: import geomstats.backend
  from geomstats.geometry.base import ComplexMatrixVectorSpace
  from geomstats.geometry.euclidean import Euclidean
  from geomstats.geometry.general_linear import SquareMatrices
  from geomstats.vectorization import get_n_points
label_desc: Use image node_id 1 for calling a global function with example usage: get_random_quaternion(n_points) and returns: gs