code: def generate_synthetic_binary_segmentation(
      height,
      width,
      num_circles=10,
      r_min=10,
      r_max=100,
      random_state=None,
  ):
      # function based on:
      # https://github.com/Project-MONAI/MONAI/blob/dev/monai/data/synthetic.py
  
      if r_min > r_max:
          raise ValueError("r_min cannot be greater than r_max")
  
      min_size = min(height, width)
      if 2 * r_max > min_size:
          raise ValueError("2 * r_max cannot be greater than min side")
  
      rs: np.random.RandomState = (
          np.random.random.__self__
          if random_state is None
          else random_state
      )
  
      mask = np.zeros((height, width), dtype=bool)
      for _ in range(num_circles):
          x = rs.randint(r_max, width - r_max)
          y = rs.randint(r_max, height - r_max)
          r = rs.randint(r_min, r_max)
          spy, spx = np.ogrid[-x : width - x, -y : height - y]
          circle = (spx * spx + spy * spy) <= r * r
  
          mask[circle] = True
  
      return mask
  
imports: import unittest
  import numpy
  from monai.transforms import LoadImage
  from monai.utils import set_determinism
  from parameterized import parameterized
  from monailabel.scribbles.infer import HistogramBasedGraphCut
  from monailabel.scribbles.transforms import AddBackgroundScribblesFromROId, ApplyGraphCutOptimisationd, InteractiveSegmentationTransform, MakeISegUnaryd, MakeLikelihoodFromScribblesHistogramd, SoftenProbSoftmax
  from monailabel.transform.writer import Writer
label_desc: Use image node_id 1 for calling a global function with example usage: generate_synthetic_binary_segmentation(height, width, num_circles, r_min, r_max, random_state) and returns: mask