code: def test_read_evokeds_mff_bad_input():
      """Test errors are thrown when reading invalid input file."""
      pytest.importorskip("mffpy", "0.5.7")
      # Test file that is not an MFF
      with pytest.raises(ValueError) as exc_info:
          read_evokeds_mff(egi_fname)
      message = 'fname must be an MFF file with extension ".mff".'
      assert str(exc_info.value) == message
      # Test continuous MFF
      with pytest.raises(ValueError) as exc_info:
          read_evokeds_mff(egi_mff_fname)
      message = (
          f"{egi_mff_fname} is a continuous MFF file. "
          "fname must be the path to an averaged MFF file."
      )
      assert str(exc_info.value) == message
  
imports: import os
  import shutil
  from copy import deepcopy
  from datetime import datetime, timezone
  from pathlib import Path
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_equal
  from scipy import io
  from mne import find_events, pick_types
  from mne._fiff.constants import FIFF
  from mne.datasets.testing import data_path, requires_testing_data
  from mne.io import read_evokeds_mff, read_raw_egi, read_raw_fif
  from mne.io.egi.egi import _combine_triggers
  from mne.io.tests.test_raw import _test_raw_reader
  from mne.utils import object_diff
label_desc: Use image node_id 9 for calling a global function with example usage: test_read_evokeds_mff_bad_input() without return types