'Returns the bound term related to proportions'

def _bound_proportions(self, z):

    dg12 = digamma((self.gamma_.T[1] + self.gamma_.T[2]))
    dg1 = (digamma(self.gamma_.T[1]) - dg12)
    dg2 = (digamma(self.gamma_.T[2]) - dg12)
    cz = stable_cumsum(z[:, ::(-1)], axis=(-1))[:, (-2)::(-1)]
    logprior = (np.sum((cz * dg2[:(-1)])) + np.sum((z * dg1)))
    del cz
    z_non_zeros = z[(z > np.finfo(np.float32).eps)]
    logprior -= np.sum((z_non_zeros * np.log(z_non_zeros)))
    return logprior
