code: def df_to_bert_dataset(df, max_length, tokenizer):
      input_ids, attention_masks, labels = df_to_bert_format(
          df, max_length, tokenizer
      )
      dataset = TensorDataset(input_ids, attention_masks, labels)
      return dataset
  
file_path: KD_Lib/KD_Lib/KD/text/utils/bert.py
imports: from copy import deepcopy
  import matplotlib.pyplot
  import numpy
  import torch
  from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset, random_split
label_desc: Use image node_id 3 for calling a global function with example usage: df_to_bert_dataset(df, max_length, tokenizer) and returns: dataset