code: def tokenize_and_mask(self, text, ng=6, sample_k=2):
      text_chunks = self.partition(text, ng)
      chunk_idx = np.random.choice(
          len(text_chunks),
          min(sample_k, len(text_chunks)),
          replace=False,
      )
      chunk_idx = sorted(chunk_idx)
      for i, idx in enumerate(chunk_idx):
          text_chunks[idx] = f"<extra_id_{i}>"
      return " ".join(text_chunks), list(chunk_idx)
  
imports: import numpy
  from abc import ABC, abstractmethod
  from .text_utils import extract_non_overlapping_ngrams
label_desc: Use image node_id 3 for calling the PerturbationModel obj's underlying member method code with example usage: obj.tokenize_and_mask(text, ng, sample_k) and returns: str,  list