class_docstr: Private class for the n-dimensional hypersphere.
  
  Class for the n-dimensional hypersphere embedded in the
  (n+1)-dimensional Euclidean space.
  
  By default, points are parameterized by their extrinsic
  (n+1)-coordinates. For dimensions 1 and 2, this can be changed with the
  `default_coords_type` parameter. For dimensions 1 (the circle),
  the intrinsic coordinates correspond angles in radians, with 0. mapping
  to point [1., 0.]. For dimension 2, the intrinsic coordinates are the
  spherical coordinates from the north pole, i.e. where angles [0., 0.]
  correspond to point [0., 0., 1.].
  
  Parameters
  ----------
  dim : int
      Dimension of the hypersphere.
  
  default_coords_type : str, {'extrinsic', 'intrinsic'}
      Type of representation for dimensions 1 and 2.
docstr: Sample in the hypersphere from the uniform distribution.
  
  Parameters
  ----------
  n_samples : int
      Number of samples.
      Optional, default: 1.
  
  Returns
  -------
  samples : array-like, shape=[..., dim + 1]
      Points sampled on the hypersphere.
docstr_tok: ["Sample","in","the","hypersphere","from","the","uniform","distribution",".","Parameters","--","--","--","--","--","n_samples",":","int","Number","of","samples",".","Optional",",","default",":","1",".","Returns","--","--","--","-","samples",":","array-like",",","shape=","[","...",",","dim","+","1","]","Points","sampled","on","the","hypersphere","."]
code: def random_uniform(self, n_samples=1):
      """Sample in the hypersphere from the uniform distribution.
  
      Parameters
      ----------
      n_samples : int
          Number of samples.
          Optional, default: 1.
  
      Returns
      -------
      samples : array-like, shape=[..., dim + 1]
          Points sampled on the hypersphere.
      """
      size = (n_samples, self.dim + 1)
  
      samples = gs.random.normal(size=size)
      while True:
          norms = gs.linalg.norm(samples, axis=1)
          indcs = gs.isclose(norms, 0.0, atol=gs.atol)
          num_bad_samples = gs.sum(indcs)
          if num_bad_samples == 0:
              break
          new_samples = gs.random.normal(
              size=(num_bad_samples, self.dim + 1)
          )
          samples = self._replace_values(samples, new_samples, indcs)
  
      samples = gs.einsum("..., ...i->...i", 1 / norms, samples)
      if n_samples == 1:
          samples = gs.squeeze(samples, axis=0)
  
      if self.dim in [1, 2] and self.default_coords_type == "intrinsic":
          return self.extrinsic_to_intrinsic_coords(samples)
      return samples
  
imports: import logging
  import math
  from itertools import product
  from scipy.stats import beta
  import geomstats.algebra_utils
  import geomstats.backend
  from geomstats.geometry.base import LevelSet
  from geomstats.geometry.euclidean import Euclidean
  from geomstats.geometry.riemannian_metric import RiemannianMetric
  from geomstats.vectorization import get_batch_shape, repeat_out
label_desc: Use image node_id 18 for calling the _Hypersphere obj's underlying member method code with example usage: obj.random_uniform(n_samples) and returns: samples, self