def METHOD_NAME(root, subjects, tasks=(None,), runs=(None,), sessions=(None,)):
    raw_fname = data_path / "MEG" / "sample" / "sample_audvis_trunc_raw.fif"
    raw = mne.io.read_raw(raw_fname)
    raw.info["line_freq"] = 60.0
    events = mne.find_events(raw)
    event_id = {
        "auditory/left": 1,
        "auditory/right": 2,
        "visual/left": 3,
        "visual/right": 4,
        "face": 5,
        "button": 32,
    }
    for subject, session, task, run in itertools.product(
        subjects, sessions, tasks, runs
    ):
        bids_path = BIDSPath(
            subject=subject,
            session=session,
            run=run,
            task=task,
            root=root,
        )
        write_raw_bids(
            raw,
            bids_path,
            events=events,
            event_id=event_id,
            overwrite=True,
            verbose=False,
        )
    return root, events, event_id