class_docstr: Stretch data for transfer learning.
  
  Change the dispersion of the datapoints around their geometric mean
  for each dataset so that they all have the same desired value.
  
  .. note::
     Using .fit() and then .transform() will give different results than
     .fit_transform(). In fact, .fit_transform() should be applied on the
     training dataset (target and source) and .transform() on the test
     partition of the target dataset.
  
  Parameters
  ----------
  target_domain : str
      Domain to consider as target.
  dispersion : float, default=1.0
      Target value for the dispersion of the data points.
  centered_data : bool, default=False
      Whether the data has been re-centered to the Identity beforehand.
  metric : str, default='riemann'
      The metric for calculating the dispersion can be: 'ale', 'alm',
      'euclid', 'harmonic', 'identity', 'kullback_sym', 'logdet',
      'logeuclid', 'riemann', 'wasserstein', or a callable function.
  
  Attributes
  ----------
  dispersions_ : dict
      Dictionary with key=domain_name and value=domain_dispersion.
  
  References
  ----------
  .. [1] `Riemannian Procrustes analysis: transfer learning for
      brain-computer interfaces
      <https://hal.archives-ouvertes.fr/hal-01971856>`_
      PLC Rodrigues et al, IEEE Transactions on Biomedical Engineering,
      vol. 66, no. 8, pp. 2390-2401, December, 2018
  
  Notes
  -----
  .. versionadded:: 0.4
class_docstr_tok: ["Stretch","data","for","transfer","learning",".","Change","the","dispersion","of","the","datapoints","around","their","geometric","mean","for","each","dataset","so","that","they","all","have","the","same","desired","value",".","..","note",":",":","Using",".fit","(",")","and","then",".transform","(",")","will","give","different","results","than",".fit_transform","(",")",".","In","fact",",",".fit_transform","(",")","should","be","applied","on","the","training","dataset","(","target","and","source",")","and",".transform","(",")","on","the","test","partition","of","the","target","dataset",".","Parameters","--","--","--","--","--","target_domain",":","str","Domain","to","consider","as","target",".","dispersion",":","float",",","default=1.0","Target","value","for","the","dispersion","of","the","data","points",".","centered_data",":","bool",",","default=False","Whether","the","data","has","been","re-centered","to","the","Identity","beforehand",".","metric",":","str",",","default='riemann'","The","metric","for","calculating","the","dispersion","can","be",":","'ale","'",",","'alm","'",",","'euclid","'",",","'harmonic","'",",","'identity","'",",","'kullback_sym","'",",","'logdet","'",",","'logeuclid","'",",","'riemann","'",",","'wasserstein","'",",","or","a","callable","function",".","Attributes","--","--","--","--","--","dispersions_",":","dict","Dictionary","with","key=domain_name","and","value=domain_dispersion",".","References","--","--","--","--","--","..","[","1","]","`","Riemannian","Procrustes","analysis",":","transfer","learning","for","brain-computer","interfaces","<","https",":","\/\/hal.archives-ouvertes.fr\/hal-01971856",">","`","_","PLC","Rodrigues","et","al",",","IEEE","Transactions","on","Biomedical","Engineering",",","vol",".","66",",","no",".","8",",","pp",".","2390-2401",",","December",",","2018","Notes","--","--","-","..","versionadded",":",":","0.4"]
code: def _center(self, X, mean):
      Mean_isqrt = invsqrtm(mean)
      return Mean_isqrt @ X @ Mean_isqrt
  
imports: import numpy
  from joblib import Parallel, delayed
  from sklearn.base import BaseEstimator, TransformerMixin, is_classifier, is_regressor
  from sklearn.pipeline import Pipeline
  from sklearn.metrics import accuracy_score, r2_score
  from ..utils.mean import mean_covariance, mean_riemann
  from ..utils.distance import distance
  from ..utils.base import invsqrtm, powm, sqrtm
  from ..utils.geodesic import geodesic
  from ..utils.utils import check_weights
  from ._rotate import _get_rotation_matrix
  from ..classification import MDM, _check_metric
  from ..preprocessing import Whitening
  from ._tools import decode_domains
label_desc: Use image node_id 3 for calling the TLStretch obj's underlying member method code with example usage: obj._center(X, mean) and returns: unknown