code: def _get_within(X, y, means, classes, exponent, metric_dist):
      """Private function to compute within dispersion."""
      sigmas = []
      for ii, ll in enumerate(classes):
          dists_within = [
              distance(x, means[ii], metric=metric_dist) ** exponent
              for x in X[y == ll]
          ]
          sigmas.append(np.mean(dists_within))
      sum_sigmas = np.sum(sigmas)
      return sum_sigmas
  
imports: import functools
  import numpy
  from sklearn.base import BaseEstimator, ClassifierMixin, TransformerMixin
  from sklearn.svm import SVC
  from sklearn.utils.extmath import softmax
  from sklearn.linear_model import LogisticRegression
  from sklearn.pipeline import make_pipeline
  from joblib import Parallel, delayed
  import warnings
  from .utils.kernel import kernel
  from .utils.mean import mean_covariance, mean_power
  from .utils.distance import distance
  from .tangentspace import FGDA, TangentSpace
label_desc: Use image node_id 5 for calling a global function with example usage: _get_within(X, y, means, classes, exponent, metric_dist) and returns: sum_sigmas