code: def test_get_montage_info_with_ch_type():
      """Test that the channel types are properly returned."""
      mat = _readmat(raw_fname_onefile_mat)
      n = len(mat["EEG"]["chanlocs"]["labels"])
      mat["EEG"]["chanlocs"]["type"] = (
          ["eeg"] * (n - 2) + ["eog"] + ["stim"]
      )
      mat["EEG"]["chanlocs"] = _dol_to_lod(mat["EEG"]["chanlocs"])
      mat["EEG"] = Bunch(**mat["EEG"])
      ch_names, ch_types, montage = _get_montage_information(
          mat["EEG"],
          get_pos=False,
          montage_units="mm",
      )
      assert len(ch_names) == len(ch_types) == n
      assert ch_types == ["eeg"] * (n - 2) + ["eog"] + ["stim"]
      assert montage is None
  
      # test unknown type warning
      mat = _readmat(raw_fname_onefile_mat)
      n = len(mat["EEG"]["chanlocs"]["labels"])
      mat["EEG"]["chanlocs"]["type"] = (
          ["eeg"] * (n - 2) + ["eog"] + ["unknown"]
      )
      mat["EEG"]["chanlocs"] = _dol_to_lod(mat["EEG"]["chanlocs"])
      mat["EEG"] = Bunch(**mat["EEG"])
      with pytest.warns(RuntimeWarning, match="Unknown types found"):
          ch_names, ch_types, montage = _get_montage_information(
              mat["EEG"],
              get_pos=False,
              montage_units="mm",
          )
  
imports: import os
  import shutil
  from copy import deepcopy
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from scipy import io
  import mne
  from mne import read_epochs_eeglab, write_events
  from mne.annotations import events_from_annotations, read_annotations
  from mne.channels import read_custom_montage
  from mne.datasets import testing
  from mne.io import read_raw_eeglab
  from mne.io.eeglab._eeglab import _readmat
  from mne.io.eeglab.eeglab import _dol_to_lod, _get_montage_information
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.utils import Bunch, _check_pymatreader_installed
label_desc: Use image node_id 16 for calling a global function with example usage: test_get_montage_info_with_ch_type() without return types