code: def spd_manifold_params(n_samples):
      """Generate spd manifold benchmarking parameters.
  
      Parameters
      ----------
      n_samples : int
          Number of samples to be used.
  
      Returns
      -------
      _ : list.
          List of params.
      """
      manifold = "SPDMatrices"
      manifold_args = [(2,), (5,), (10,)]
      module = "geomstats.geometry.spd_matrices"
  
      def spd_affine_metric_params():
          params = []
          metric = "SPDAffineMetric"
          power_args = [-0.5, 1, 0.5]
          metric_args = list(
              product([item for item, in manifold_args], power_args)
          )
          manifold_args_re = [
              item
              for item in manifold_args
              for i in range(len(power_args))
          ]
          kwargs = {}
          common = manifold, module, metric, n_samples, kwargs
          for manifold_arg, metric_arg in zip(
              manifold_args_re, metric_args
          ):
              params += [common + (manifold_arg, metric_arg)]
          return params
  
      def spd_bures_wasserstein_metric_params():
          params = []
          metric = "SPDBuresWassersteinMetric"
          metric_args = manifold_args
          kwargs = {}
          common = manifold, module, metric, n_samples, kwargs
          for manifold_arg, metric_arg in zip(
              manifold_args, metric_args
          ):
              params += [common + (manifold_arg, metric_arg)]
          return params
  
      def spd_euclidean_metric_params():
          params = []
          metric = "SPDEuclideanMetric"
          power_args = [-0.5, 1, 0.5]
          metric_args = list(
              product([item for item, in manifold_args], power_args)
          )
          manifold_args_re = [
              item
              for item in manifold_args
              for i in range(len(power_args))
          ]
          kwargs = {}
          common = manifold, module, metric, n_samples, kwargs
          for manifold_arg, metric_arg in zip(
              manifold_args_re, metric_args
          ):
              params += [common + (manifold_arg, metric_arg)]
          return params
  
      def spd_log_euclidean_metric_params():
          params = []
          metric = "SPDLogEuclideanMetric"
          metric_args = manifold_args
          kwargs = {}
          common = manifold, module, metric, n_samples, kwargs
          for manifold_arg, metric_arg in zip(
              manifold_args, metric_args
          ):
              params += [common + (manifold_arg, metric_arg)]
          return params
  
      return list(
          chain(
              *[
                  spd_bures_wasserstein_metric_params(),
                  spd_affine_metric_params(),
                  spd_euclidean_metric_params(),
                  spd_log_euclidean_metric_params(),
              ]
          )
      )
  
file_path: geomstats/benchmarks/generate_benchmark_params.py
imports: import argparse
  from itertools import chain, product
  import pandas
label_desc: Use image node_id 1 for calling a global function with example usage: spd_manifold_params(n_samples) and returns: list, params, params, params, params