code: def _compute_subcorr(G, phi_sig):
      """Compute the subspace correlation."""
      Ug, Sg, Vg = _safe_svd(G, full_matrices=False)
      # Now we look at the actual rank of the forward fields
      # in G and handle the fact that it might be rank defficient
      # eg. when using MEG and a sphere model for which the
      # radial component will be truly 0.
      rank = np.sum(Sg > (Sg[0] * 1e-6))
      if rank == 0:
          return 0, np.zeros(len(G))
      rank = max(rank, 2)  # rank cannot be 1
      Ug, Sg, Vg = Ug[:, :rank], Sg[:rank], Vg[:rank]
      tmp = np.dot(Ug.T.conjugate(), phi_sig)
      Uc, Sc, _ = _safe_svd(tmp, full_matrices=False)
      X = np.dot(Vg.T / Sg[None, :], Uc[:, 0])  # subcorr
      return Sc[0], X / np.linalg.norm(X)
  
file_path: mne-python/mne/beamformer/_rap_music.py
imports: import numpy
  from scipy import linalg
  from .._fiff.pick import pick_channels_forward, pick_info
  from ..fixes import _safe_svd
  from ..forward import convert_forward_solution, is_fixed_orient
  from ..inverse_sparse.mxne_inverse import _make_dipoles_sparse
  from ..minimum_norm.inverse import _log_exp_var
  from ..utils import _check_info_inv, fill_doc, logger, verbose
  from ._compute_beamformer import _prepare_beamformer_input
label_desc: Use image node_id 2 for calling a global function with example usage: _compute_subcorr(G, phi_sig) and returns: Sc,  unknown, int,  np