code: def test_gdf2_data():
      """Test reading raw GDF 2.x files."""
      raw = read_raw_gdf(
          gdf2_path.with_name(gdf2_path.name + ".gdf"),
          eog=None,
          misc=None,
          preload=True,
      )
      assert raw._raw_extras[0]["subject_info"]["age"] is None
  
      picks = pick_types(raw.info, meg=False, eeg=True, exclude="bads")
      data, _ = raw[picks]
  
      # This .mat was generated using the official biosig matlab package
      mat = sio.loadmat(
          gdf2_path.with_name(gdf2_path.name + "_biosig.mat")
      )
      data_biosig = mat["dat"] * 1e-6  # data are stored in microvolts
      data_biosig = data_biosig[picks]
  
      # Assert data are almost equal
      assert_array_almost_equal(data, data_biosig, 8)
  
      # Find events
      events = find_events(raw, verbose=1)
      events[
          :, 2
      ] >>= 8  # last 8 bits are system events in biosemi files
      assert_equal(events.shape[0], 2)  # 2 events in file
      assert_array_equal(events[:, 2], [20, 28])
  
      # gh-5604
      assert raw.info["meas_date"] is None
      _test_raw_reader(
          read_raw_gdf,
          input_fname=gdf2_path.with_name(gdf2_path.name + ".gdf"),
          eog=None,
          misc=None,
          test_scaling=False,  # XXX this should be True
      )
  
file_path: mne-python/mne/io/edf/tests/test_gdf.py
imports: import shutil
  from datetime import datetime, timedelta, timezone
  import numpy
  import pytest
  import scipy.io
  from numpy.testing import assert_array_almost_equal, assert_array_equal, assert_equal
  from mne import events_from_annotations, find_events, pick_types
  from mne.datasets import testing
  from mne.io import read_raw_gdf
  from mne.io.tests.test_raw import _test_raw_reader
label_desc: Use image node_id 3 for calling a global function with example usage: test_gdf2_data() without return types