class_docstr: Geometric median.
  
  Parameters
  ----------
  space : Manifold
      Equipped manifold.
  max_iter : int
      Maximum number of iterations for the algorithm.
      Optional, default : 100
  lr : float
      Learning rate to be used for the algorithm.
      Optional, default : 1.0
  init_point : array-like, shape=[*space.shape]
      Initialization to be used in the start.
      Optional, default : None, in which case it uses last sample.
  print_every : int
      Print updated median after print_every iterations.
      Optional, default : None
  epsilon : float
      Tolerance for stopping the algorithm (distance between two successive
      estimates).
      Optional, default : gs.atol
  
  Attributes
  ----------
  estimate_ : array-like, shape=[*space.shape]
      If fit, geometric median.
  
  Notes
  -----
  * Required metric methods: `dist`, `log`, `exp`.
  
  References
  ----------
  .. [FVJ2009] Fletcher PT, Venkatasubramanian S and Joshi S.
      "The geometric median on Riemannian manifolds with application to
      robust atlas estimation", NeuroImage, 2009
      https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2735114/
docstr: Compute a single iteration of Weiszfeld algorithm.
  
  Parameters
  ----------
  current_median : array-like, shape=[*space.shape]
      Current median.
  X : array-like, shape=[n_samples, *space.shape]
      Training input samples.
  weights : array-like, shape=[n_samples,]
      Weights for weighted sum.
  lr : float
      Learning rate for the current iteration.
  
  Returns
  -------
  updated_median : array-like, shape=[*metric.shape]
      Updated median after single iteration.
docstr_tok: ["Compute","a","single","iteration","of","Weiszfeld","algorithm",".","Parameters","--","--","--","--","--","current_median",":","array-like",",","shape=","[","*","space.shape","]","Current","median",".","X",":","array-like",",","shape=","[","n_samples",",","*","space.shape","]","Training","input","samples",".","weights",":","array-like",",","shape=","[","n_samples",",","]","Weights","for","weighted","sum",".","lr",":","float","Learning","rate","for","the","current","iteration",".","Returns","--","--","--","-","updated_median",":","array-like",",","shape=","[","*","metric.shape","]","Updated","median","after","single","iteration","."]
code: def _iterate_once(self, current_median, X, weights, lr):
      """Compute a single iteration of Weiszfeld algorithm.
  
      Parameters
      ----------
      current_median : array-like, shape=[*space.shape]
          Current median.
      X : array-like, shape=[n_samples, *space.shape]
          Training input samples.
      weights : array-like, shape=[n_samples,]
          Weights for weighted sum.
      lr : float
          Learning rate for the current iteration.
  
      Returns
      -------
      updated_median : array-like, shape=[*metric.shape]
          Updated median after single iteration.
      """
      dists = self.space.metric.dist(current_median, X)
      is_non_zero = dists > gs.atol
      if not gs.any(is_non_zero):
          return current_median
  
      w = weights[is_non_zero] / dists[is_non_zero]
      logs = self.space.metric.log(X[is_non_zero], current_median)
      v_k = gs.einsum("n,n...->...", w / gs.sum(w), logs)
      updated_median = self.space.metric.exp(lr * v_k, current_median)
      return updated_median
  
imports: import logging
  from sklearn.base import BaseEstimator
  import geomstats.backend
label_desc: Use image node_id 2 for calling the GeometricMedian obj's underlying member method code with example usage: obj._iterate_once(current_median, X, weights, lr) and returns: updated_median, current_median