class_docstr: LogNormal Distribution on manifold of SPD Matrices.
docstr: Generate samples for SPD manifold.
docstr_tok: ["Generate","samples","for","SPD","manifold","."]
code: def sample(self, n_samples):
      """Generate samples for SPD manifold."""
      if isinstance(self.space.metric, SPDLogEuclideanMetric):
          sym_matrix = logmh(self.mean)
          mean_euclidean = gs.hstack(
              (
                  gs.diagonal(sym_matrix)[None, :],
                  gs.sqrt(2.0)
                  * gs.triu_to_vec(sym_matrix, k=1)[None, :],
              )
          )[0]
          _samples = self.samples_sym(
              mean_euclidean, self.cov, n_samples
          )
  
      else:
          samples_sym = self.samples_sym(
              gs.zeros(self.space.dim), self.cov, n_samples
          )
          mean_half = powermh(self.mean, 0.5)
          _samples = Matrices.mul(mean_half, samples_sym, mean_half)
  
      return expmh(_samples)
  
file_path: geomstats/geomstats/distributions/lognormal.py
imports: import geomstats.backend
  from geomstats.geometry.euclidean import Euclidean, EuclideanMetric
  from geomstats.geometry.hermitian_matrices import expmh, powermh
  from geomstats.geometry.matrices import Matrices, MatricesMetric
  from geomstats.geometry.spd_matrices import SPDAffineMetric, SPDLogEuclideanMetric, SPDMatrices, logmh
label_desc: Use image node_id 4 for calling the LogNormalSPD obj's underlying member method code with example usage: obj.sample(n_samples) and returns: expmh