code: def add_scribbles_from_roi(
      scribbles, roi, scribbles_fg_label, scribbles_bg_label
  ):
      mask = scribbles.astype(bool)
      mask[
          :,
          roi[0] : roi[1],
          roi[2] : roi[3],
          roi[4] : roi[5],
      ] = True
      scribbles[~mask] = scribbles_bg_label
      if not np.any(scribbles == scribbles_fg_label):
          offset = 5
  
          cx = int((roi[0] + roi[1]) / 2)
          cy = int((roi[2] + roi[3]) / 2)
          cz = int((roi[4] + roi[5]) / 2)
  
          # add scribbles at center of roi
          scribbles[
              :,
              cx - offset : cx + offset,
              cy - offset : cy + offset,
              cz - offset : cz + offset,
          ] = scribbles_fg_label
  
      return scribbles
  
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 4 for calling a global function with example usage: add_scribbles_from_roi(scribbles, roi, scribbles_fg_label, scribbles_bg_label) and returns: scribbles