code: def _tok_function(
      self, raw_dataset, args: TCTrainArgs, file_type: str
  ) -> Dataset:
      def __preprocess_function(case):
          result = self.tokenizer(
              case["text"], truncation=True, padding=True
          )
          result["labels"] = case["label"]
          return result
  
      tok_dataset = raw_dataset.map(
          __preprocess_function,
          batched=True,
          remove_columns=["text", "label"],
          desc="Tokenizing data",
      )
  
      return tok_dataset
  
imports: import csv
  from typing import Union
  from dataclasses import dataclass
  from datasets import Dataset
  from tqdm import tqdm
  from transformers import AutoConfig, AutoModelForSequenceClassification, AutoTokenizer, DataCollatorWithPadding, TextClassificationPipeline
  from happytransformer.adaptors import get_adaptor
  from happytransformer.args import TCEvalArgs, TCTestArgs, TCTrainArgs
  from happytransformer.fine_tuning_util import EvalResult
  from happytransformer.happy_transformer import HappyTransformer
label_desc: Use image node_id 6 for calling the HappyTextClassification obj's underlying member method code with example usage: obj._tok_function(raw_dataset, args, file_type) and returns: tok_dataset, result