code: def _estimate_rank_meeg_cov(
      data,
      info,
      scalings,
      tol="auto",
      return_singular=False,
      verbose=None,
  ):
      """Estimate rank of M/EEG covariance data, given the covariance.
  
      Parameters
      ----------
      data : np.ndarray of float, shape (n_channels, n_channels)
          The M/EEG covariance.
      %(info_not_none)s
      scalings : dict | 'norm' | np.ndarray | None
          The rescaling method to be applied. If dict, it will override the
          following default dict:
  
              dict(mag=1e12, grad=1e11, eeg=1e5)
  
          If 'norm' data will be scaled by channel-wise norms. If array,
          pre-specified norms will be used. If None, no scaling will be applied.
      tol : float | str
          Tolerance. See ``estimate_rank``.
      return_singular : bool
          If True, also return the singular values that were used
          to determine the rank.
  
      Returns
      -------
      rank : int
          Estimated rank of the data.
      s : array
          If return_singular is True, the singular values that were
          thresholded to determine the rank are also returned.
      """
      picks_list = _picks_by_type(info, exclude=[])
      scalings = _handle_default("scalings_cov_rank", scalings)
      _apply_scaling_cov(data, picks_list, scalings)
      if data.shape[1] < data.shape[0]:
          ValueError(
              "You've got fewer samples than channels, your "
              "rank estimate might be inaccurate."
          )
      out = estimate_rank(
          data, tol=tol, norm=False, return_singular=return_singular
      )
      rank = out[0] if isinstance(out, tuple) else out
      ch_type = " + ".join(list(zip(*picks_list))[0])
      logger.info("    Estimated rank (%s): %d" % (ch_type, rank))
      _undo_scaling_cov(data, picks_list, scalings)
      return out
  
file_path: mne-python/mne/rank.py
imports: import numpy
  from scipy import linalg
  from ._fiff.meas_info import Info, _simplify_info
  from ._fiff.pick import _picks_by_type, _picks_to_idx, pick_channels_cov, pick_info
  from ._fiff.proj import make_projector
  from .defaults import _handle_default
  from .utils import _apply_scaling_cov, _check_on_missing, _check_rank, _compute_row_norms, _on_missing, _pl, _scaled_array, _undo_scaling_cov, _validate_type, fill_doc, logger, verbose, warn
label_desc: Use image node_id 5 for calling a global function with example usage: _estimate_rank_meeg_cov(data, info, scalings, tol, return_singular, verbose) and returns: out