def _get_mri_header(fname):
    """Get MRI header using nibabel"""
    import nibabel as nib
    img = nib.load(fname)
    try:
        return img.header
    except __HOLE__:  # old nibabel
        return img.get_header()
dataset/ETHPy150Open mne-tools/mne-python/mne/source_space.py/_get_mri_header