class_docstr: UL2 Dataset from https://arxiv.org/abs/2205.05131.
  Consists of three different objectives:
  1. Short span masking with small probabilities (ex: T5). Typically max ngram size of 5 with 0.15 mask prob.
  2. Extreme span masking with either large probabilities or large ngram sizes or both.
  3. Prefx-LM as in the T5 or LM-adapted T5 (prompt-tuning paper).
class_docstr_tok: ["UL2","Dataset","from","https",":","\/\/arxiv.org\/abs\/2205.05131",".","Consists","of","three","different","objectives",":","1",".","Short","span","masking","with","small","probabilities","(","ex",":","T5",")",".","Typically","max","ngram","size","of","5","with","0.15","mask","prob",".","2",".","Extreme","span","masking","with","either","large","probabilities","or","large","ngram","sizes","or","both",".","3",".","Prefx-LM","as","in","the","T5","or","LM-adapted","T5","(","prompt-tuning","paper",")","."]
code: def get_s_masking_training_sample(
      cls,
      sample,
      np_rng,
      max_seq_length_encoder: int,
      max_seq_length_decoder: int,
      tokenizer: TokenizerSpec,
      prefix_lm_pivot_mean: float,
      pivot_distribution: LengthDistribution,
      add_eos: bool = False,
  ):
      sample = [token for sentence in sample for token in sentence]
      sample = T5LMAdaptedDataset.get_prefix_lm_sample(
          sample=sample,
          max_seq_length_encoder=max_seq_length_encoder,
          max_seq_length_decoder=max_seq_length_decoder,  # We don't use max_seq_length_decoder here since we typically want to use long decoder sequences for better LM performance and we can do +1 because we don't need to add the UL2 token here.
          np_rng=np_rng,
          tokenizer=tokenizer,
          pivot_mean=prefix_lm_pivot_mean,
          pivot_distribution=pivot_distribution,
          add_eos=add_eos,
      )
      sample = UL2Dataset._prepend_mask_type_token(
          tokenizer, sample, "<extra_id_s>"
      )
      return sample
  
file_path: NeMo/nemo/collections/nlp/data/language_modeling/megatron/ul2_dataset.py
imports: import numpy
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
  from nemo.collections.nlp.data.language_modeling.megatron.dataset_utils import create_extreme_masked_lm_predictions
  from nemo.collections.nlp.data.language_modeling.megatron.length_distribution_type import LengthDistribution
  from nemo.collections.nlp.data.language_modeling.megatron.lm_adapted_t5_dataset import T5LMAdaptedDataset
  from nemo.collections.nlp.data.language_modeling.megatron.t5_dataset import T5Dataset
label_desc: Use image node_id 3 for calling the UL2Dataset obj's underlying member method code with example usage: obj.get_s_masking_training_sample(cls, sample, np_rng, max_seq_length_encoder, max_seq_length_decoder, tokenizer, prefix_lm_pivot_mean, pivot_distribution, add_eos) and returns: sample