def _mri_subject_has_bem(subject, subjects_dir=None):
    subjects_dir = get_subjects_dir(subjects_dir, raise_error=True)
    pattern = bem_fname.format(subjects_dir=subjects_dir, subject=subject,
                               name='*-bem')
    fnames = glob(pattern)
    return bool(len(fnames))
Check whether an mri subject has a file matching the bem pattern
dataset/ETHPy150Open mne-tools/mne-python/mne/coreg.py/_mri_subject_has_bem