class_docstr: A user facing class for text classification
class_docstr_tok: ["A","user","facing","class","for","text","classification"]
code: def _tok_function(
      self,
      raw_dataset,
      args: Union[WPTrainArgs, WPEvalArgs],
      file_type: str,
  ) -> Dataset:
      if file_type == "text":
          if not args.line_by_line:
              return tok_text_gen_mlm(
                  tokenizer=self.tokenizer,
                  dataset=raw_dataset,
                  args=args,
                  mlm=True,
              )
          else:
  
              def tokenize_function(example):
                  return self.tokenizer(
                      example["text"],
                      add_special_tokens=True,
                      truncation=True,
                  )
  
              tokenized_dataset = raw_dataset.map(
                  tokenize_function,
                  batched=True,
                  remove_columns=["text"],
              )
              return tokenized_dataset
      else:
          return csv_tok_text_gen_mlm(
              tokenizer=self.tokenizer,
              dataset=raw_dataset,
              args=args,
              mlm=True,
          )
  
file_path: happy-transformer/happytransformer/happy_word_prediction.py
imports: from dataclasses import dataclass
  from datasets import Dataset
  from typing import List, Optional, Union
  from transformers import AutoModelForMaskedLM, DataCollatorForLanguageModeling, FillMaskPipeline
  from happytransformer.adaptors import get_adaptor
  from happytransformer.args import WPEvalArgs, WPTrainArgs
  from happytransformer.fine_tuning_util import EvalResult, tok_text_gen_mlm, csv_tok_text_gen_mlm
  from happytransformer.happy_transformer import HappyTransformer
label_desc: Use image node_id 6 for calling the HappyWordPrediction obj's underlying member method code with example usage: obj._tok_function(raw_dataset, args, file_type) and returns: csv_tok_text_gen_mlm, tok_text_gen_mlm, tokenized_dataset, self