code: def make_ellipses(gmm, ax):
      for n, color in enumerate(colors):
          if gmm.covariance_type == "full":
              covariances = gmm.covariances_[n][:2, :2]
          elif gmm.covariance_type == "tied":
              covariances = gmm.covariances_[:2, :2]
          elif gmm.covariance_type == "diag":
              covariances = np.diag(gmm.covariances_[n][:2])
          elif gmm.covariance_type == "spherical":
              covariances = (
                  np.eye(gmm.means_.shape[1]) * gmm.covariances_[n]
              )
          v, w = np.linalg.eigh(covariances)
          u = w[0] / np.linalg.norm(w[0])
          angle = np.arctan2(u[1], u[0])
          angle = 180 * angle / np.pi  # convert to degrees
          v = 2.0 * np.sqrt(2.0) * np.sqrt(v)
          ell = mpl.patches.Ellipse(
              gmm.means_[n, :2],
              v[0],
              v[1],
              angle=180 + angle,
              color=color,
          )
          ell.set_clip_box(ax.bbox)
          ell.set_alpha(0.5)
          ax.add_artist(ell)
          ax.set_aspect("equal", "datalim")
  
imports: import matplotlib
  import matplotlib.pyplot
  import numpy
  from sklearn import datasets
  from sklearn.mixture import GaussianMixture
  from sklearn.model_selection import StratifiedKFold
label_desc: Use image node_id 1 for calling a global function with example usage: make_ellipses(gmm, ax) without return types