The usual derangement formula, for permutations of $\{1,\dots,n\}$ without fixed points, is given as follows:
$$\sum_{i=0}^n (-1)^{n-i}i!\binom{n}{i} = D(n).$$
Richard Stanley, in his Enumerative Combinatorics (bottom of page 269), gives the following formula for derangements of a multiset of type $\alpha=(\alpha_1,....,\alpha_k)$:
$$D(\alpha) = \sum_{\beta_{1} =0}^{\alpha_1} ... \sum_{\beta_k=0}^{\alpha_k} \binom{\alpha_1}{\beta_1}\binom{\alpha_2}{\beta_2}...\binom{\alpha_k}{\beta_k}(-1)^{\beta_1+....+\beta_k} \binom{\sum (\alpha_i-\beta_i)}{\alpha_1-\beta_1,\alpha_2-\beta_2,...,\alpha_k-\beta_k}.$$
In the solution it says the derangement formula of $D(n)$ can be straightforwardly generalized to the sum above for the given type $\alpha=(\alpha_1,...., \alpha_k)$, where $M_\alpha$ is the multi-set $\{1^{\alpha_1},....,k^{\alpha_k}\}$.
Stanley defines a derangement of $M_\alpha$ as "a permutation $a_1a_2...a_n$ (where $\sum\alpha_i=n$) of $ M_\alpha$ such that it disagrees with every position we get by listing the elements of $M$ in a weakly increasing order, for example for the set $\{1,2^2,3\}$ the two possible derangements are $(2132,2312)$."
My question is how is that generalization straightforward? I don't see how that is achieved.