def METHOD_NAME(n, k, s, eta, pref=1.0):
    r"""Probability of observing a total of :math:`n` photons when :math:`k` identical
    single-mode squeezed vacua with squeezing parameter :math:`s` undergo loss by transmission :math:`\eta`.
    For the derivation see Appendix E of `'Quantum Computational Supremacy via High-Dimensional Gaussian Boson Sampling',
    Deshpande et al. <https://arxiv.org/abs/2102.12474>`_.
    Args:
        n (int): number of photons
        k (int): number of squeezed modes
        s (float): squeezing parameter
        eta (float): transmission parameter, between 0 and 1 inclusive
        pref (float): use to return the probability times ``pref**n``
    Returns:
        (float): probability of observing a total of ``n`` photons or the probability times ``pref ** n``.
    """
    if n % 2 == 0:
        peven = (
            binom(-1 + k / 2.0 + n / 2.0, n / 2.0)
            * hyp2f1(0.5 + n / 2.0, k / 2.0 + n / 2.0, 0.5, (1 - eta) ** 2 * np.tanh(s) ** 2)
            * (1 / np.cosh(s)) ** k
            * (pref * eta * np.tanh(s)) ** n
        )
        return peven
    podd = (
        (1 + n)
        * (1 - eta)
        * binom((-1 + k + n) / 2.0, (1 + n) / 2.0)
        * hyp2f1((2 + n) / 2.0, (1 + k + n) / 2.0, 1.5, (1 - eta) ** 2 * np.tanh(s) ** 2)
        * (1 / np.cosh(s)) ** k
        * np.tanh(s)
        * (pref * eta * np.tanh(s)) ** n
    )
    return podd