code: def gendata(coeffs, npts=20):
      """Generate a 2D dataset of npts enclosed in circle of given coeffs,
      where coeffs = (x,y,r).
  
      NOTE: if npts == None, constrain all points to circle of given radius
      """
      if not npts:
          return gencircle(coeffs)
  
      def points_circle(N):
          # generate N random points in a unit circle
          n = 0
          while n < N:
              x = random.random() * 2.0 - 1.0
              y = random.random() * 2.0 - 1.0
              if x * x + y * y <= 1:
                  n = n + 1
                  yield [x, y]
  
      x0, y0, R0 = coeffs
      xy = array(list(points_circle(npts))) * R0
      xy[:, 0] += x0
      xy[:, 1] += y0
      return xy
  
file_path: mystic/mystic/models/circle.py
imports: from .abstract_model import AbstractModel
  from numpy import array, pi, arange
  from numpy import sin, cos
  from math import floor, sqrt
  import random
label_desc: Use image node_id 2 for calling a global function with example usage: gendata(coeffs, npts) and returns: xy, gencircle