def METHOD_NAME(tmp_path):
    """Test count_events with no event present."""
    pytest.importorskip("pandas")
    raw_fname = data_path / "MEG" / "sample" / "sample_audvis_trunc_raw.fif"
    raw = mne.io.read_raw(raw_fname)
    raw.info["line_freq"] = 60.0
    root = str(tmp_path)
    bids_path = BIDSPath(
        subject="01",
        task="task1",
        root=root,
    )
    write_raw_bids(raw, bids_path, overwrite=True, verbose=False)
    with pytest.raises(ValueError, match="No events files found."):
        count_events(root)