code: def test_measurement_date_outside_range_valid_for_edf(tmp_path):
      """Test trying to save an EDF with a measurement date before 1985-01-01."""
      raw = _create_raw_for_edf_tests()
      raw.set_meas_date(
          datetime(year=1984, month=1, day=1, tzinfo=timezone.utc)
      )
      with pytest.raises(
          ValueError, match="EDF only allows dates from 1985 to 2084"
      ):
          raw.export(tmp_path / "test.edf", overwrite=True)
  
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 9 for calling a global function with example usage: test_measurement_date_outside_range_valid_for_edf(tmp_path) without return types