def test_calibrate_with(self, signal):
        calibration_signal_level = 50.0
        decibel = 94.0
        calibration_signal = Signal(np.random.randn(signal.samples), signal.fs).calibrate_to(calibration_signal_level)
        
        out = signal.calibrate_with(calibration_signal, decibel)
        assert ( (out.leq() - signal.leq()).mean() - (decibel - calibration_signal_level) ) < 0.01
dataset/ETHPy150Open python-acoustics/python-acoustics/tests/test__signal.py/TestSignal.test_calibrate_with/original