code: def test_create_events():
      """Test 2dim trialinfo fields."""
      test_data_folder_ft = get_data_paths("neuromag306")
      cur_fname = test_data_folder_ft / "epoched_v7.mat"
      original_data = pymatreader.read_mat(
          cur_fname,
          [
              "data",
          ],
      )
  
      new_data = copy.deepcopy(original_data)
      new_data["trialinfo"] = np.array(
          [[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]
      )
  
      with pytest.raises(ValueError):
          _create_events(new_data, -1)
  
      for cur_col in np.arange(4):
          evts = _create_events(new_data, cur_col)
          assert np.all(evts[:, 2] == cur_col + 1)
  
      with pytest.raises(ValueError):
          _create_events(new_data, 4)
  
imports: import copy
  import itertools
  from contextlib import nullcontext
  import numpy
  import pytest
  import mne
  from mne.datasets import testing
  from mne.io import read_raw_fieldtrip
  from mne.io.fieldtrip.tests.helpers import assert_warning_in_record, check_data, check_info_fields, get_data_paths, get_epochs, get_evoked, get_raw_data, get_raw_info, pandas_not_found_warning_msg
  from mne.io.fieldtrip.utils import NOINFO_WARNING, _create_events
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.utils import _check_pandas_installed, _record_warnings
label_desc: Use image node_id 6 for calling a global function with example usage: test_create_events() without return types