code: def test_bdf_data():
      """Test reading raw bdf files."""
      # XXX BDF data for these is around 0.01 when it should be in the uV range,
      # probably some bug
      test_scaling = False
      raw_py = _test_raw_reader(
          read_raw_bdf,
          input_fname=bdf_path,
          eog=eog,
          misc=misc,
          exclude=["M2", "IEOG"],
          test_scaling=test_scaling,
      )
      assert len(raw_py.ch_names) == 71
      raw_py = _test_raw_reader(
          read_raw_bdf,
          input_fname=bdf_path,
          montage="biosemi64",
          eog=eog,
          misc=misc,
          exclude=["M2", "IEOG"],
          test_scaling=test_scaling,
      )
      assert len(raw_py.ch_names) == 71
      assert "RawEDF" in repr(raw_py)
      picks = pick_types(
          raw_py.info, meg=False, eeg=True, exclude="bads"
      )
      data_py, _ = raw_py[picks]
  
      # this .mat was generated using the EEG Lab Biosemi Reader
      raw_eeglab = loadmat(bdf_eeglab_path)
      raw_eeglab = (
          raw_eeglab["data"] * 1e-6
      )  # data are stored in microvolts
      data_eeglab = raw_eeglab[picks]
      # bdf saved as a single, resolution to seven decimal points in matlab
      assert_array_almost_equal(data_py, data_eeglab, 8)
  
      # Manually checking that float coordinates are imported
      assert (raw_py.info["chs"][0]["loc"]).any()
      assert (raw_py.info["chs"][25]["loc"]).any()
      assert (raw_py.info["chs"][63]["loc"]).any()
  
imports: import datetime
  from contextlib import nullcontext
  from functools import partial
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal, assert_equal
  from scipy.io import loadmat
  from mne import Annotations, pick_types
  from mne._fiff.pick import channel_indices_by_type, get_channel_type_constants
  from mne.annotations import _ndarray_ch_names, events_from_annotations, read_annotations
  from mne.datasets import testing
  from mne.io import edf, read_raw_bdf, read_raw_edf, read_raw_fif, read_raw_gdf
  from mne.io.edf.edf import _edf_str, _parse_prefilter_string, _read_annotations_edf, _read_ch, _read_edf_header, _read_header
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.tests.test_annotations import _assert_annotations_equal
label_desc: Use image node_id 5 for calling a global function with example usage: test_bdf_data() without return types