code: def _create_events(ft_struct, trialinfo_column):
      """Create an event matrix from the FieldTrip structure."""
      if "trialinfo" not in ft_struct:
          return None
  
      event_type = ft_struct["trialinfo"]
      event_number = range(len(event_type))
  
      if trialinfo_column < 0:
          raise ValueError("trialinfo_column must be positive")
  
      available_ti_cols = 1
      if event_type.ndim == 2:
          available_ti_cols = event_type.shape[1]
  
      if trialinfo_column > (available_ti_cols - 1):
          raise ValueError(
              "trialinfo_column is higher than the amount of"
              "columns in trialinfo."
          )
  
      event_trans_val = np.zeros(len(event_type))
  
      if event_type.ndim == 2:
          event_type = event_type[:, trialinfo_column]
  
      events = (
          np.vstack(
              [np.array(event_number), event_trans_val, event_type]
          )
          .astype("int")
          .T
      )
  
      return events
  
file_path: mne-python/mne/io/fieldtrip/utils.py
imports: import numpy
  from ..._fiff._digitization import DigPoint, _ensure_fiducials_head
  from ..._fiff.constants import FIFF
  from ..._fiff.meas_info import create_info
  from ..._fiff.pick import pick_info
  from ...transforms import rotation3d_align_z_axis
  from ...utils import _check_pandas_installed, warn
label_desc: Use image node_id 7 for calling a global function with example usage: _create_events(ft_struct, trialinfo_column) and returns: events, None