code: def test_eog_channel(method):
      """Test that EOG channel is included when performing ICA."""
      _skip_check_picard(method)
      raw = read_raw_fif(raw_fname, preload=True)
      events = read_events(event_name)
      picks = pick_types(
          raw.info,
          meg=True,
          stim=True,
          ecg=False,
          eog=True,
          exclude="bads",
      )
      epochs = Epochs(
          raw,
          events,
          event_id,
          tmin,
          tmax,
          picks=picks,
          baseline=None,
          preload=True,
          proj=False,
      )
      n_components = 0.9
      ica = ICA(n_components=n_components, method=method)
      # Test case for MEG and EOG data. Should have EOG channel
      for inst in [raw, epochs]:
          picks1a = pick_types(
              inst.info,
              meg=True,
              stim=False,
              ecg=False,
              eog=False,
              exclude="bads",
          )[:4]
          picks1b = pick_types(
              inst.info,
              meg=False,
              stim=False,
              ecg=False,
              eog=True,
              exclude="bads",
          )
          picks1 = np.append(picks1a, picks1b)
          ica.fit(inst, picks=picks1)
          assert any("EOG" in ch for ch in ica.ch_names)
          _assert_ica_attributes(
              ica, inst.get_data(picks1), limits=(0.8, 600)
          )
      # Test case for MEG data. Should have no EOG channel
      for inst in [raw, epochs]:
          picks1 = pick_types(
              inst.info,
              meg=True,
              stim=False,
              ecg=False,
              eog=False,
              exclude="bads",
          )[:5]
          ica.fit(inst, picks=picks1)
          _assert_ica_attributes(ica)
          assert not any("EOG" in ch for ch in ica.ch_names)
  
imports: import os
  import shutil
  from contextlib import nullcontext
  from pathlib import Path
  import matplotlib.pyplot
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from scipy import linalg, stats
  from scipy.io import loadmat, savemat
  from mne import Annotations, Epochs, EpochsArray, EvokedArray, Info, create_info, make_ad_hoc_cov, pick_channels_regexp, pick_types, read_events
  from mne._fiff.pick import _DATA_CH_TYPES_SPLIT, get_channel_type_constants
  from mne.cov import read_cov
  from mne.datasets import testing
  from mne.event import make_fixed_length_events
  from mne.io import RawArray, read_raw_ctf, read_raw_eeglab, read_raw_fif
  from mne.io.eeglab.eeglab import _check_load_mat
  from mne.preprocessing import ICA
  from mne.preprocessing import ica_find_ecg_events, ica_find_eog_events, read_ica
  from mne.preprocessing.ica import _ica_explained_variance, _sort_components, corrmap, get_score_funcs, read_ica_eeglab
  from mne.rank import _compute_rank_int
  from mne.utils import _record_warnings, catch_logging, check_version
label_desc: Use image node_id 22 for calling a global function with example usage: test_eog_channel(method) without return types