code: def test_get_channel_types_equiv(meg, eeg, ordered):
      """Test equivalence of get_channel_types."""
      raw = read_raw_fif(fif_fname)
      pick_types(raw.info, meg=meg, eeg=eeg)
      picks = pick_types(raw.info, meg=meg, eeg=eeg)
      if not ordered:
          picks = np.random.RandomState(0).permutation(picks)
      if not meg and not eeg:
          with pytest.raises(
              ValueError, match="No appropriate channels"
          ):
              raw.get_channel_types(picks=picks)
          return
      types = np.array(raw.get_channel_types(picks=picks))
      types_iter = np.array(
          [channel_type(raw.info, idx) for idx in picks]
      )
      assert_array_equal(types, types_iter)
  
imports: from copy import deepcopy
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from mne import Epochs, channel_indices_by_type, channel_type, create_info, make_ad_hoc_cov, pick_channels, pick_channels_cov, pick_channels_regexp, pick_info, pick_types, pick_types_forward, read_forward_solution, rename_channels
  from mne._fiff.constants import FIFF
  from mne._fiff.pick import _DATA_CH_TYPES_SPLIT, _contains_ch_type, _picks_by_type, _picks_to_idx, get_channel_type_constants
  from mne.channels import make_standard_montage
  from mne.datasets import testing
  from mne.io import RawArray, read_info, read_raw_bti, read_raw_fif, read_raw_kit
  from mne.preprocessing import compute_current_source_density
  from mne.utils import assert_object_equal, catch_logging
label_desc: Use image node_id 22 for calling a global function with example usage: test_get_channel_types_equiv(meg, eeg, ordered) without return types