code: def _determine_tokenizer_type(
      cls, tokenizer, whole_word_masking=False
  ):
      tokenizer_type = "wordpiece"  # TODO: better checks for tokenizer types. How do we do this for HF tokenizers that are not BERT?
      if isinstance(tokenizer, YouTokenToMeTokenizer):
          raise ValueError(
              f"YTTM does not support special tokens and cannot be used with T5 datasets."
          )
  
      if isinstance(tokenizer, SentencePieceTokenizer):
          if not tokenizer.legacy:
              raise ValueError(
                  "Sentencepiece Tokenizer must have legacy = False to add special tokens."
              )
          tokenizer_type = "sentencepiece"
          if whole_word_masking:
              raise ValueError(
                  "Whole word masking is not supported with sentencepiece tokenizers and only with wordpiece tokenizers. Please set it to False."
              )
  
      return tokenizer_type
  
imports: import collections
  import os
  import numpy
  import torch
  from nemo.collections.common.tokenizers import SentencePieceTokenizer, YouTokenToMeTokenizer
  from nemo.collections.nlp.data.language_modeling.megatron.dataset_utils import create_masked_lm_predictions, get_samples_mapping
  from nemo.collections.nlp.data.language_modeling.megatron.gpt_dataset import _build_index_mappings
  from nemo.core import Dataset
label_desc: Use image node_id 6 for calling the T5Dataset obj's underlying member method code with example usage: obj._determine_tokenizer_type(cls, tokenizer, whole_word_masking) and returns: tokenizer_type