code: def generate_label_with_noise(
      height,
      width,
      label_key="label",
      noisy_key="noisy",
      pred_key="pred",
      num_slices=1,
  ):
      label = generate_synthetic_binary_segmentation(
          height, width, num_circles=10, r_min=10, r_max=50
      )
      noisy_invert = ~add_salt_and_pepper_noise(
          generate_synthetic_binary_segmentation(
              height, width, num_circles=10, r_min=10, r_max=50
          ),
          p=0.7,
      )
      noisy = label & noisy_invert
      label = np.expand_dims(label, axis=0).astype(np.float32)
      noisy = np.expand_dims(noisy, axis=0).astype(np.float32)
  
      if num_slices >= 1:
          if num_slices != 1:
              label = np.expand_dims(label, axis=0)
              noisy = np.expand_dims(noisy, axis=0)
  
              tmp_list = []
              for _ in range(num_slices):
                  tmp_list.append(label)
              label = np.concatenate(tmp_list, axis=1)
  
              tmp_list = []
              for _ in range(num_slices):
                  tmp_list.append(noisy)
              noisy = np.concatenate(tmp_list, axis=1)
      else:
          raise ValueError(
              f"unrecognised num_slices selected [{num_slices}]"
          )
  
      pred = label
      label = np.concatenate([1 - label, label], axis=0)
  
      return {label_key: label, noisy_key: noisy, pred_key: pred}
  
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 3 for calling a global function with example usage: generate_label_with_noise(height, width, label_key, noisy_key, pred_key, num_slices) and returns: dict