Some of the current examples are hacking GaussianMixture() to set up the input dataset. In more recent versions of scikit-learn sampling with a none witted GaussianMixture is not really supported feature (discussion around scikit-learn/scikit-learn#7822 (comment)).
So while is possible to hack it around, we should look into other ways to generate the input dataset for these user facing examples.
examples are e.g.: book_figures/chapter6/fig_GMM_nclusters.py