code: def _tok_function(
      self,
      raw_dataset: Dataset,
      args: Union[GENTrainArgs, GENEvalArgs],
      file_type: str,
  ) -> Dataset:
      if file_type == "text":
          return tok_text_gen_mlm(
              tokenizer=self.tokenizer,
              dataset=raw_dataset,
              args=args,
              mlm=False,
          )
      else:
          return csv_tok_text_gen_mlm(
              tokenizer=self.tokenizer,
              dataset=raw_dataset,
              args=args,
              mlm=False,
          )
  
imports: from dataclasses import dataclass
  from typing import List, Union
  from datasets import Dataset
  from transformers import AutoModelForCausalLM, default_data_collator, TextGenerationPipeline
  from happytransformer.adaptors import get_adaptor
  from happytransformer.args import GENEvalArgs, GENTrainArgs
  from happytransformer.fine_tuning_util import csv_tok_text_gen_mlm, EvalResult, tok_text_gen_mlm
  from happytransformer.happy_transformer import HappyTransformer
label_desc: Use image node_id 9 for calling the HappyGeneration obj's underlying member method code with example usage: obj._tok_function(raw_dataset, args, file_type) and returns: tok_text_gen_mlm, csv_tok_text_gen_mlm