code: def _normalize_R(G, R, G_3, n_nzero, force_equal, n_src, n_orient):
      """Normalize R so that lambda2 is consistent."""
      if n_orient == 1 or force_equal:
          R_Gt = R[:, np.newaxis] * G.T
      else:
          R_Gt = np.matmul(R, G_3).reshape(n_src * 3, -1)
      G_R_Gt = G @ R_Gt
      norm = np.trace(G_R_Gt) / n_nzero
      G_R_Gt /= norm
      R /= norm
      return G_R_Gt
  
file_path: mne-python/mne/minimum_norm/_eloreta.py
imports: from functools import partial
  import numpy
  from ..defaults import _handle_default
  from ..fixes import _safe_svd
  from ..utils import eigh, logger, sqrtm_sym, warn
label_desc: Use image node_id 2 for calling a global function with example usage: _normalize_R(G, R, G_3, n_nzero, force_equal, n_src, n_orient) and returns: G_R_Gt