code: def _compute_csd(G_precomputed, H, radius):
      """Compute the CSD."""
      n_channels = H.shape[0]
      data = np.eye(n_channels)
      mu = data.mean(0)
      Z = data - mu
  
      Gi, TC, sgi = G_precomputed
  
      Cp2 = np.dot(Gi, Z)
      c02 = np.sum(Cp2, axis=0) / sgi
      C2 = Cp2 - np.dot(TC[:, np.newaxis], c02[np.newaxis, :])
      X = np.dot(C2.T, H).T / radius**2
      return X
  
file_path: mne-python/mne/preprocessing/_csd.py
imports: import numpy
  from scipy.optimize import minimize_scalar
  from scipy.stats import gaussian_kde
  from .._fiff.constants import FIFF
  from .._fiff.pick import pick_types
  from ..bem import fit_sphere_to_headshape
  from ..channels.interpolation import _calc_g, _calc_h
  from ..epochs import BaseEpochs, make_fixed_length_epochs
  from ..evoked import Evoked
  from ..io import BaseRaw
  from ..utils import _check_preload, _ensure_int, _validate_type, logger, verbose
label_desc: Use image node_id 2 for calling a global function with example usage: _compute_csd(G_precomputed, H, radius) and returns: X