def _check_state(monomer, site, state):
    """ Check a monomer site allows the specified state """
    if state not in monomer.site_states[site]:
        args = state, monomer.name, site, monomer.site_states[site]
        template = (
            "Invalid state choice '{}' in Monomer {}, site {}. Valid state choices: {}"
            )
        raise ValueError(template.format(*args))
    return True
