def METHOD_NAME(cov, modes_A=None, split=None, hbar=2):
    r"""Returns the entanglement entropy of a covariance matrix under a given
    bipartition.
    Args:
        cov (array): a covariance matrix
        modes_A (iterable or int): the subset of modes used for the bipartition
        split (int): the index of the mode separating the two partitions
            (alternative to ``modes_A``)
        hbar (float): the value of :math:`\hbar` in the commutation
            relation :math:`[\x,\p]=i\hbar`
    Returns:
        (float): logarithmic negativity
    """
    if not is_pure_cov(cov, hbar=hbar):
        raise ValueError("Input is not a pure covariance matrix.")
    cov = cov / (hbar / 2)
    M = int(len(cov) / 2)
    modes_A = get_partition(modes_A, split, M)
    _, cov_A = reduced_gaussian(np.zeros(2 * M), cov, modes_A)
    E = vonneumann_entropy(cov_A)
    return E