code: def _check_one_ch_type(
      method, info, forward, data_cov=None, noise_cov=None
  ):
      """Check number of sensor types and presence of noise covariance matrix."""
      from .._fiff.pick import _contains_ch_type, pick_info
      from ..cov import Covariance, make_ad_hoc_cov
      from ..time_frequency.csd import CrossSpectralDensity
  
      if isinstance(data_cov, CrossSpectralDensity):
          _validate_type(
              noise_cov, [None, CrossSpectralDensity], "noise_cov"
          )
          # FIXME
          picks = list(range(len(data_cov.ch_names)))
          info_pick = info
      else:
          _validate_type(noise_cov, [None, Covariance], "noise_cov")
          picks = _check_info_inv(
              info,
              forward,
              data_cov=data_cov,
              noise_cov=noise_cov,
              verbose=_verbose_safe_false(),
          )
          info_pick = pick_info(info, picks)
      ch_types = [
          _contains_ch_type(info_pick, tt)
          for tt in ("mag", "grad", "eeg")
      ]
      if sum(ch_types) > 1:
          if noise_cov is None:
              raise ValueError(
                  "Source reconstruction with several sensor types"
                  " requires a noise covariance matrix to be "
                  "able to apply whitening."
              )
      if noise_cov is None:
          noise_cov = make_ad_hoc_cov(info_pick, std=1.0)
          allow_mismatch = True
      else:
          noise_cov = noise_cov.copy()
          if (
              isinstance(noise_cov, Covariance)
              and "estimator" in noise_cov
          ):
              del noise_cov["estimator"]
          allow_mismatch = False
      _validate_type(
          noise_cov, (Covariance, CrossSpectralDensity), "noise_cov"
      )
      return noise_cov, picks, allow_mismatch
  
imports: import numbers
  import operator
  import os
  import re
  from builtins import input
  from difflib import get_close_matches
  from importlib import import_module
  from pathlib import Path
  import numpy
  from ..defaults import HEAD_SIZE_DEFAULT, _handle_default
  from ..fixes import _compare_version, _median_complex
  from ._logging import _record_warnings, _verbose_safe_false, logger, verbose, warn
label_desc: Use image node_id 34 for calling a global function with example usage: _check_one_ch_type(method, info, forward, data_cov, noise_cov) and returns: noise_cov,  picks,  allow_mismatch