def METHOD_NAME(r, hbar):
    """Tests the log_negativity for two modes states following Eq. 1 of https://journals.aps.org/pra/pdf/10.1103/PhysRevA.63.022305"""
    cov = (hbar / 2) * two_mode_squeezing(2 * r, 0)
    expected = (np.cosh(r) ** 2) * np.log(np.cosh(r) ** 2) - np.sinh(r) ** 2 * np.log(
        np.sinh(r) ** 2
    )
    obtained = entanglement_entropy(cov, modes_A=[0], hbar=hbar)
    assert np.allclose(expected, obtained)