def kBU_(B,kBU,Cooperativity,P):
    """Returns the receptor unbinding rate kUB for either the cooperative or the non-cooperative binding model.

    Parameters
    ----------
    B : float
        Number of bound receptors.
    kBU : float
        Rate at which AMPARs unbind from PSD slots.
    Cooperativity : 0, 1
        Specifies whether cooperative recepotr binding is accounted for (=1) or not (=0).
    P : float
        Number of binding site/slots at the PSD.
        
    Returns
    -------
    float
        kUB.
    """
    if Cooperativity==1:
        Lambda = 0.9*P + 15.5;
        Beta = 0.6*P + 9.3;
        return kBU*(Lambda/(Beta + B)-0.5);
    else:
        return kBU