code: def __init__(
      self,
      mask_model,
      mask_tokenizer,
      partition_fn="split_chunks",
      device="cuda",
      num_processes=8,
  ):
      self.mask_model = mask_model
      self.mask_tokenizer = mask_tokenizer
      self.pattern = re.compile(r"<extra_id_\d+>")
      self.device = device
      self.partition_fn = (
          split_chunks
          if partition_fn == "split_chunks"
          else extract_non_overlapping_ngrams
      )
  
imports: import numpy
  from abc import ABC, abstractmethod
  from .text_utils import extract_non_overlapping_ngrams
label_desc: Use image node_id 1 to create a new PerturbationModel object  with example: obj = PerturbationModel(mask_model, mask_tokenizer, partition_fn, device, num_processes)