def get_marginal_protein_obs(p: int, r_max: int):
    """Get the observable for a marginalized protein abundance."""
    marginal = ''
    for r in range(r_max-1):
        marginal += f'x_{r}_{p} + '
    marginal += f'x_{r_max-1}_{p}'

    return {'name': f'x_p{p}', 'formula': marginal}