code: def __init__(
      self,
      irregular_proba=1 / 3,
      irregular_kwargs=None,
      box_proba=1 / 3,
      box_kwargs=None,
      segm_proba=1 / 3,
      segm_kwargs=None,
      squares_proba=0,
      squares_kwargs=None,
      superres_proba=0,
      superres_kwargs=None,
      outpainting_proba=0,
      outpainting_kwargs=None,
      invert_proba=0,
  ):
      self.probas = []
      self.gens = []
  
      if irregular_proba > 0:
          self.probas.append(irregular_proba)
          if irregular_kwargs is None:
              irregular_kwargs = {}
          else:
              irregular_kwargs = dict(irregular_kwargs)
          irregular_kwargs["draw_method"] = DrawMethod.LINE
          self.gens.append(
              RandomIrregularMaskGenerator(**irregular_kwargs)
          )
  
      if box_proba > 0:
          self.probas.append(box_proba)
          if box_kwargs is None:
              box_kwargs = {}
          self.gens.append(RandomRectangleMaskGenerator(**box_kwargs))
  
      # if segm_proba > 0:
      #     self.probas.append(segm_proba)
      #     if segm_kwargs is None:
      #         segm_kwargs = {}
      #     self.gens.append(RandomSegmentationMaskGenerator(**segm_kwargs))
  
      if squares_proba > 0:
          self.probas.append(squares_proba)
          if squares_kwargs is None:
              squares_kwargs = {}
          else:
              squares_kwargs = dict(squares_kwargs)
          squares_kwargs["draw_method"] = DrawMethod.SQUARE
          self.gens.append(
              RandomIrregularMaskGenerator(**squares_kwargs)
          )
  
      if superres_proba > 0:
          self.probas.append(superres_proba)
          if superres_kwargs is None:
              superres_kwargs = {}
          self.gens.append(
              RandomSuperresMaskGenerator(**superres_kwargs)
          )
  
      if outpainting_proba > 0:
          self.probas.append(outpainting_proba)
          if outpainting_kwargs is None:
              outpainting_kwargs = {}
          self.gens.append(
              OutpaintingMaskGenerator(**outpainting_kwargs)
          )
  
      self.probas = np.array(self.probas, dtype="float32")
      self.probas /= self.probas.sum()
      self.invert_proba = invert_proba
  
imports: import math
  import random
  import hashlib
  import logging
  from enum import Enum
  import cv2
  import numpy
label_desc: Use image node_id 1 to create a new MixedMaskGenerator object  with example: obj = MixedMaskGenerator(irregular_proba, irregular_kwargs, box_proba, box_kwargs, segm_proba, segm_kwargs, squares_proba, squares_kwargs, superres_proba, superres_kwargs, outpainting_proba, outpainting_kwargs, invert_proba)