class_docstr: Metaclass for test classes driven by test definition.
  
  Note: A test class is a class that inherits from TestCase.
  For example, `class TestEuclidean(TestCase)` defines
  a test class.
  
  The Parametrizer helps its test class by pairing:
  - the different test functions of the test class:
    - e.g. the test function `test_belongs`,
  - with different test data, generated by auxiliary test data functions
    - e.g. the test data function `belongs_data` that generates data
    to test the function `belongs`.
  
  As such, Parametrizer acts as a "metaclass" of its test class:
  `class TestEuclidean(TestCase, metaclass=Parametrizer)`.
  
  Specifically, Parametrizer decorates every test function inside
  its test class with pytest.mark.parametrizer, with the exception
  of the test class' class methods and static methods.
  
  Two conventions need to be respected:
  1. The test class should contain an attribute named 'testing_data'.
    - `testing_data` is an object inheriting from `TestData`.
  2. Every test function should have its corresponding test data function created
  inside the TestData object called `testing_data`.
  
  A sample test class looks like this:
  
  ```
  class TestDataEuclidean(TestData):
      def belongs_data():
          ...
          return self.generate_tests(...)
  
  class TestEuclidean(TestCase, metaclass=Parametrizer):
      testing_data = TestDataEuclidean()
      def test_belongs():
          ...
  ```
  Parameters
  ----------
  cls : child class of TestCase
      Test class, i.e. a class inheriting from TestCase
  name : str
      Name of the test class
  bases : TestCase
      Parent class of the test class: TestCase.
  attrs : dict
      Attributes of the test class, for example its methods,
      stored in a dictionnary as (key, value) when key gives the
      name of the attribute (for example the name of the method),
      and value gives the actual attribute (for example the method
      itself.)
  
  References
  ----------
  More on pytest's parametrizers can be found here:
  https://docs.pytest.org/en/6.2.x/parametrize.html
class_docstr_tok: ["Metaclass","for","test","classes","driven","by","test","definition",".","Note",":","A","test","class","is","a","class","that","inherits","from","TestCase",".","For","example",",","`","class","TestEuclidean","(","TestCase",")","`","defines","a","test","class",".","The","Parametrizer","helps","its","test","class","by","pairing",":","-","the","different","test","functions","of","the","test","class",":","-","e.g",".","the","test","function","`","test_belongs","`",",","-","with","different","test","data",",","generated","by","auxiliary","test","data","functions","-","e.g",".","the","test","data","function","`","belongs_data","`","that","generates","data","to","test","the","function","`","belongs","`",".","As","such",",","Parametrizer","acts","as","a","``","metaclass","''","of","its","test","class",":","`","class","TestEuclidean","(","TestCase",",","metaclass=Parametrizer",")","`",".","Specifically",",","Parametrizer","decorates","every","test","function","inside","its","test","class","with","pytest.mark.parametrizer",",","with","the","exception","of","the","test","class","'","class","methods","and","static","methods",".","Two","conventions","need","to","be","respected",":","1",".","The","test","class","should","contain","an","attribute","named","'testing_data","'",".","-","`","testing_data","`","is","an","object","inheriting","from","`","TestData","`",".","2",".","Every","test","function","should","have","its","corresponding","test","data","function","created","inside","the","TestData","object","called","`","testing_data","`",".","A","sample","test","class","looks","like","this",":","``","`","class","TestDataEuclidean","(","TestData",")",":","def","belongs_data","(",")",":","...","return","self.generate_tests","(","...",")","class","TestEuclidean","(","TestCase",",","metaclass=Parametrizer",")",":","testing_data","=","TestDataEuclidean","(",")","def","test_belongs","(",")",":","...","``","`","Parameters","--","--","--","--","--","cls",":","child","class","of","TestCase","Test","class",",","i.e",".","a","class","inheriting","from","TestCase","name",":","str","Name","of","the","test","class","bases",":","TestCase","Parent","class","of","the","test","class",":","TestCase",".","attrs",":","dict","Attributes","of","the","test","class",",","for","example","its","methods",",","stored","in","a","dictionnary","as","(","key",",","value",")","when","key","gives","the","name","of","the","attribute","(","for","example","the","name","of","the","method",")",",","and","value","gives","the","actual","attribute","(","for","example","the","method","itself",".",")","References","--","--","--","--","--","More","on","pytest","'s","parametrizers","can","be","found","here",":","https",":","\/\/docs.pytest.org\/en\/6.2.x\/parametrize.html"]
code: def __new__(cls, name, bases, attrs):
      testing_data = locals()["attrs"].get("testing_data")
      _raise_missing_testing_data(testing_data)
  
      test_funcs = _collect_all_tests(attrs, bases, active=True)
      _check_test_data_pairing(test_funcs, testing_data)
  
      if testing_data.skip_all:
          for test_func in test_funcs.values():
              test_func.add_mark("skip")
  
      _update_attrs(test_funcs, testing_data, attrs)
      return super().__new__(cls, name, bases, attrs)
  
imports: import functools
  import importlib
  import inspect
  import json
  import os
  import subprocess
  import tempfile
  import types
  import warnings
  import pytest
  from matplotlib import pyplot
  import geomstats.backend
  from geomstats.exceptions import AutodiffNotImplementedError
  from geomstats.test.test_case import autodiff_backend
  from geomstats.test.vectorization import test_vectorization
label_desc: Use image node_id 1 for calling the Parametrizer obj's underlying member method code with example usage: obj.__new__(cls, name, bases, attrs) and returns: super