def METHOD_NAME(levels, expected, n_samples_out):
    """Test Cochlea class"""
    np.random.seed(0)
    signal = np.random.random(1000)
    audiogram_cfs = np.array([250, 500, 2000])
    audiogram = Audiogram(levels=levels, frequencies=audiogram_cfs)
    cochlea = Cochlea(audiogram=audiogram)
    result = cochlea.simulate(coch_sig=signal, equiv_0dB_file_SPL=100.0)
    assert result.shape == (n_samples_out,)
    assert np.sum(np.abs(result)) == pytest.approx(
        expected, rel=pytest.rel_tolerance, abs=pytest.abs_tolerance
    )