code: def kmedoids_poincare_ball():
      """Run K-medoids on the Poincare ball."""
      n_samples = 20
      dim = 2
      n_clusters = 2
      manifold = PoincareBall(dim=dim)
  
      cluster_1 = gs.random.uniform(
          low=0.5, high=0.6, size=(n_samples, dim)
      )
      cluster_2 = gs.random.uniform(
          low=-0.2, high=0, size=(n_samples, dim)
      )
      data = gs.concatenate((cluster_1, cluster_2), axis=0)
  
      kmedoids = RiemannianKMedoids(
          manifold, n_clusters=n_clusters, max_iter=100, init="random"
      )
  
      kmedoids.fit(X=data)
      cluster_centers_ = kmedoids.cluster_centers_
      labels = kmedoids.labels_
  
      plt.figure(1)
      colors = ["red", "blue"]
  
      ax = visualization.plot(
          data,
          space="H2_poincare_disk",
          marker=".",
          color="black",
          coords_type=manifold.default_coords_type,
      )
  
      for i in range(n_clusters):
          ax = visualization.plot(
              data[labels == i],
              ax=ax,
              space="H2_poincare_disk",
              marker=".",
              color=colors[i],
              coords_type=manifold.default_coords_type,
          )
  
      ax = visualization.plot(
          cluster_centers_,
          ax=ax,
          space="H2_poincare_disk",
          marker="*",
          color="green",
          s=100,
          coords_type=manifold.default_coords_type,
      )
  
      ax.set_title("Kmedoids on Poincaré Ball Manifold")
  
      return plt
  
file_path: geomstats/examples/plot_kmedoids_manifolds.py
imports: import logging
  import os
  import matplotlib.pyplot
  import geomstats.backend
  import geomstats.visualization
  from geomstats.geometry.hypersphere import Hypersphere
  from geomstats.geometry.poincare_ball import PoincareBall
  from geomstats.learning.kmedoids import RiemannianKMedoids
label_desc: Use image node_id 1 for calling a global function with example usage: kmedoids_poincare_ball() and returns: plt