code: def test_double_export_edf(tmp_path):
      """Test exporting an EDF file multiple times."""
      raw = _create_raw_for_edf_tests(stim_channel_index=2)
      raw.info.set_meas_date("2023-09-04 14:53:09.000")
  
      # include subject info and measurement date
      raw.info["subject_info"] = dict(
          his_id="12345",
          first_name="mne",
          last_name="python",
          birthday=(1992, 1, 20),
          sex=1,
          weight=78.3,
          height=1.75,
          hand=3,
      )
  
      # export once
      temp_fname = tmp_path / "test.edf"
      with pytest.warns(
          RuntimeWarning, match="Exporting STIM channels"
      ):
          raw.export(temp_fname, add_ch_type=True)
      raw_read = read_raw_edf(
          temp_fname, infer_types=True, preload=True
      )
  
      # export again
      raw_read.export(temp_fname, add_ch_type=True, overwrite=True)
      raw_read = read_raw_edf(
          temp_fname, infer_types=True, preload=True
      )
  
      # stim channel should be dropped
      raw.drop_channels("2")
  
      assert raw.ch_names == raw_read.ch_names
      assert_array_almost_equal(
          raw.get_data(), raw_read.get_data(), decimal=10
      )
      assert_array_equal(raw.times, raw_read.times)
  
      # check info
      for key in set(raw.info) - {"chs"}:
          assert raw.info[key] == raw_read.info[key]
  
      orig_ch_types = raw.get_channel_types()
      read_ch_types = raw_read.get_channel_types()
      assert_array_equal(orig_ch_types, read_ch_types)
  
imports: from contextlib import nullcontext
  from datetime import datetime, timezone
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal
  from mne import Annotations, Epochs, create_info, read_epochs_eeglab, read_evokeds, read_evokeds_mff
  from mne.datasets import misc, testing
  from mne.export import export_evokeds, export_evokeds_mff
  from mne.fixes import _compare_version
  from mne.io import RawArray, read_raw_brainvision, read_raw_edf, read_raw_eeglab, read_raw_fif
  from mne.tests.test_epochs import _get_data
  from mne.utils import _check_edfio_installed, _record_warnings, _resource_path, object_diff
label_desc: Use image node_id 4 for calling a global function with example usage: test_double_export_edf(tmp_path) without return types