code: def generate_Wishart(n, V):
      """
      Generate a sample from Wishart density
  
      Parameters
      ----------
      n: float,
          the number of degrees of freedom of the Wishart density
      V: array of shape (n,n)
         the scale matrix of the Wishart density
  
      Returns
      -------
      W: array of shape (n,n)
         the draw from Wishart density
      """
      icv = cholesky(V)
      p = V.shape[0]
      A = nr.randn(p, p)
      for i in range(p):
          A[i, i:] = 0
          A[i, i] = np.sqrt(nr.chisquare(n - i))
      R = np.dot(icv, A)
      W = np.dot(R, R.T)
      return W
  
imports: import math
  import numpy
  import numpy.random
  from scipy.linalg import cholesky, eigvalsh, inv
  from scipy.special import gammaln
  from .gmm import GMM
  from .utils import kmeans
label_desc: Use image node_id 4 for calling a global function with example usage: generate_Wishart(n, V) and returns: W