code: def _form_symmetric(function, eigenvalues, eigenvectors):
      """Return the symmetric matrix with the given eigenvectors and \
      eigenvalues transformed by function.
  
      Parameters
      ----------
      function : function numpy.ndarray -> numpy.ndarray
          The transform to apply to the eigenvalues.
  
      eigenvalues : numpy.ndarray, shape (n_features, )
          Input argument of the function.
  
      eigenvectors : numpy.ndarray, shape (n_features, n_features)
          Unitary matrix.
  
      Returns
      -------
      output : numpy.ndarray, shape (n_features, n_features)
          The symmetric matrix obtained after transforming the eigenvalues, while
          keeping the same eigenvectors.
  
      """
      return np.dot(
          eigenvectors * function(eigenvalues), eigenvectors.T
      )
  
imports: import warnings
  from math import floor, sqrt
  import numpy
  from scipy import linalg
  from sklearn.base import BaseEstimator, TransformerMixin, clone
  from sklearn.covariance import LedoitWolf
  from nilearn._utils.docs import fill_doc
  from ..None import signal
  from .._utils.extmath import is_spd
label_desc: Use image node_id 3 for calling a global function with example usage: _form_symmetric(function, eigenvalues, eigenvectors) and returns: np