docs: def apply_optimization(self, update_embedding_with, grad, **kwargs):
          """
          Calculating (Obtaining) the learning rate (eta) and apply optimizations
          on the embedding states by the specified method.
  
          Parameters
          ----------
          update_embedding_with : function
              Function used to update the state of RiemannianRelaxation
              class (Y or S).
  
          grad : (n x s) array
              Gradients used in updating the embedding.
  
          calc_loss : function (used by its child function)
              Function used to calculated the loss from the temperary state of
              RiemannianRelaxation instance. (YT or ST)
  
          loss : float (used by its child function)
              Loss of the current state of RiemannianRelaxation instance.
          """
          if self.linesearch:
              return self._apply_linesearch_optimzation(update_embedding_with,
                                                        grad, **kwargs)
          else:
              return self._apply_fixed_optimization(update_embedding_with,
                                                    grad, **kwargs)