def _embed_state(embedding, state):
    """Embed a single state/sample by spreading it's values over the chains in the embedding"""
    return {u: state[v] for v, chain in embedding.items() for u in chain}