code: def estimate_dominant_eigenvector(matrix):
      """Returns the dominant eigenvector of the symmetric matrix A by minimizing
      the Rayleigh quotient -x' * A * x / (x' * x).
      """
      num_rows, num_columns = gs.shape(matrix)
      if num_rows != num_columns:
          raise ValueError("Matrix must be square.")
      if not gs.allclose(gs.sum(matrix - gs.transpose(matrix)), 0.0):
          raise ValueError("Matrix must be symmetric.")
  
      @pymanopt.function.Callable
      def cost(vector):
          return -gs.dot(vector, gs.dot(matrix, vector))
  
      @pymanopt.function.Callable
      def egrad(vector):
          return -2 * gs.dot(matrix, vector)
  
      sphere = GeomstatsSphere(num_columns)
      problem = pymanopt.Problem(
          manifold=sphere, cost=cost, egrad=egrad
      )
      solver = SteepestDescent()
      return solver.solve(problem)
  
file_path: geomstats/examples/geomstats_in_pymanopt.py
imports: import logging
  import os
  import pymanopt
  from pymanopt.manifolds.manifold import EuclideanEmbeddedSubmanifold
  from pymanopt.solvers import SteepestDescent
  import geomstats.backend
  from geomstats.geometry.hypersphere import Hypersphere
label_desc: Use image node_id 1 for calling a global function with example usage: estimate_dominant_eigenvector(matrix) and returns: solver, unknown, unknown