def _assert_shielding(raw_sss, erm_power, shielding_factor, meg='mag'):
    """Helper to assert a minimum shielding factor using empty-room power"""
    picks = pick_types(raw_sss.info, meg=meg)
    sss_power = raw_sss[picks][0].ravel()
    sss_power = np.sqrt(np.sum(sss_power * sss_power))
    factor = erm_power / sss_power
    assert_true(factor >= shielding_factor,
                'Shielding factor %0.3f < %0.3f' % (factor, shielding_factor))
dataset/ETHPy150Open mne-tools/mne-python/mne/preprocessing/tests/test_maxwell.py/_assert_shielding/original