code: def main():
      """Illustrative example of the behaviour of imm"""
      n = 100
      dim = 2
      alpha = 0.5
      aff = np.random.randn(dim, dim)
      x = np.dot(np.random.randn(n, dim), aff)
      igmm = IMM(alpha, dim)
      igmm.set_priors(x)
  
      # warming
      igmm.sample(x, niter=100, kfold=10)
      print("number of components: ", igmm.k)
  
      #
      print("number of components: ", igmm.k)
  
      if dim < 3:
          from .gmm import plot2D
  
          plot2D(x, igmm, verbose=1)
      return igmm
  
imports: import math
  import numpy
  from scipy.special import gammaln
  from .bgmm import BGMM, detsh
label_desc: Use image node_id 2 for calling a global function with example usage: main() and returns: igmm