code: def spd_with_affine_metric(request):
      n = request.param
      request.cls.space = SPDMatrices(n=n)
  
imports: import random
  import pytest
  import geomstats.backend
  from geomstats.geometry.positive_lower_triangular_matrices import PositiveLowerTriangularMatrices
  from geomstats.geometry.scalar_product_metric import ScalarProductMetric
  from geomstats.geometry.spd_matrices import CholeskyMap, LieCholeskyMetric, MatrixPower, SPDAffineMetric, SPDBuresWassersteinMetric, SPDEuclideanMetric, SPDLogEuclideanMetric, SPDMatrices, SPDPowerMetric, SymMatrixLog
  from geomstats.geometry.symmetric_matrices import SymmetricMatrices
  from geomstats.test.parametrizers import DataBasedParametrizer
  from geomstats.test.random import RandomDataGenerator
  from geomstats.test_cases.geometry.diffeo import DiffeoTestCase
  from geomstats.test_cases.geometry.pullback_metric import PullbackDiffeoMetricTestCase
  from geomstats.test_cases.geometry.riemannian_metric import RiemannianMetricTestCase
  from geomstats.test_cases.geometry.spd_matrices import SPDEuclideanMetricTestCase, SPDMatricesTestCase
  from .data.diffeo import DiffeoTestData
  from .data.spd_matrices import CholeskyMapSmokeTestData, LieCholeskyMetricTestData, MatrixPower05TestData, SPD2AffineMetricTestData, SPD2BuresWassersteinMetricTestData, SPD2EuclideanMetricTestData, SPD2LogEuclideanMetricTestData, SPD3AffineMetricPower05TestData, SPD3BuresWassersteinMetricTestData, SPD3EuclideanMetricPower05TestData, SPD3EuclideanMetricTestData, SPD3LogEuclideanMetricTestData, SPDAffineMetricTestData, SPDBuresWassersteinMetricTestData, SPDEuclideanMetricTestData, SPDLogEuclideanMetricTestData, SPDMatrices2TestData, SPDMatrices3TestData, SPDMatricesTestData, SymMatrixLogSmokeTestData
label_desc: Use image node_id 2 for calling a global function with example usage: spd_with_affine_metric(request) without return types