code: def genpoints_following_cov(covmatrix, size=1000):
      u = np.random.uniform(-5, 5, size=(100000, 2))
      mask = np.einsum("ij,jk,ik->i", u, covmatrix, u) <= 1
      points = u[mask, :][:size, :]
      return points
  
imports: from ultranest.mlfriends import ScalingLayer, AffineLayer
  import numpy
  import matplotlib.pyplot
label_desc: Use image node_id 1 for calling a global function with example usage: genpoints_following_cov(covmatrix, size) and returns: points