def get_mu(lam, a, beta1, beta2, lam_c,
           verbose = 0):
    """Function to compute the latent parameter mu.

    Args:
        lam (float): The latent parameter lambda
                     of a node in the WHSCM.
        a (float): The a parameter of the WHSCM.
        beta1 (float): The beta1 parameter of the WHSCM.
        beta2 (float): The beta2 parameter of the WHSCM.
        lam_c (float): The switching point between the
                       two exponents of the double power-laws
                       in the WHSCM.

    Returns:
        mu (float): The latent parameter mu.
    """
    if lam >= 1 and lam <= lam_c:
        mu = a * lam**(-beta1)
    elif lam > lam_c:
        mu = a * (lam_c**(beta2 - beta1)) * lam**(-beta2)
    else:
        if verbose == 1:
            print("ERROR (get_mu): Lambda parameter has to be between 1 and infinity.")
        mu = None
    return mu