code: def mask_prompt(self, sample):
      sample = sample.split()
      sentinel_idx = 0
      for i, word in enumerate(sample):
          if word == "<mask>":
              sample[i] = f"<extra_id_{sentinel_idx}>"
              sentinel_idx += 1
      sample = " ".join(sample)
      sample = self.tokenizer.text_to_ids(sample)
      if self.add_eos_to_encoder_input:
          sample = sample + [self.tokenizer.eos_id]
      sample = torch.LongTensor(sample)
      self.request["masked_sample"] = sample
  
file_path: NeMo/nemo/collections/nlp/data/language_modeling/megatron/request_dataset.py
imports: from typing import Dict, List
  import torch
  from torch.utils.data.dataset import Dataset
label_desc: Use image node_id 2 for calling the T5RequestDataset obj's underlying member method code with example usage: obj.mask_prompt(sample) without return types