code: def make_likelihood_image_gmm(
      image,
      scrib,
      scribbles_bg_label,
      scribbles_fg_label,
      num_mixtures=20,
      return_label=False,
  ):
      # learn gmm and apply to image, return output label prob
      retprob = learn_and_apply_gmm_monai(
          image=image,
          scrib=scrib,
          scribbles_bg_label=scribbles_bg_label,
          scribbles_fg_label=scribbles_fg_label,
          num_mixtures=num_mixtures,
      )
  
      # if needed, convert to discrete labels instead of probability
      if return_label:
          retprob = np.expand_dims(
              np.argmax(retprob, axis=0), axis=0
          ).astype(np.float32)
  
      return retprob
  
file_path: MONAILabel/monailabel/scribbles/utils.py
imports: import logging
  import numpy
  import numpymaxflow
  import torch
  from monai.networks.layers import GaussianMixtureModel
label_desc: Use image node_id 7 for calling a global function with example usage: make_likelihood_image_gmm(image, scrib, scribbles_bg_label, scribbles_fg_label, num_mixtures, return_label) and returns: retprob