def METHOD_NAME(rule, sampler, machine, parameters, state, key, σ):
    n_chains = σ.shape[0]
    # pick a random cluster
    cluster_id = jax.random.randint(
        key, shape=(n_chains,), minval=0, maxval=rule.clusters.shape[0]
    )
    def scalar_update_fun(σ, cluster):
        # sites to be exchanged,
        si = rule.clusters[cluster, 0]
        sj = rule.clusters[cluster, 1]
        σp = σ.at[si].set(σ[sj])
        return σp.at[sj].set(σ[si])
    return (
        jax.vmap(scalar_update_fun, in_axes=(0, 0), out_axes=0)(σ, cluster_id),
        None,
    )