code: def __init__(
      self,
      tokenizer,
      device,
      data_dir=None,
      test_data=None,
      batch_size_per_gpu=16,
      max_seq_length=512,
      multi_gpu=True,
      multi_label=False,
      model_type="bert",
      logger=None,
      clear_cache=False,
      no_cache=False,
  ):
      # just in case someone passes string instead of Path
      if isinstance(data_dir, str):
          data_dir = Path(data_dir)
  
      if isinstance(tokenizer, str):
          # instantiate the new tokeniser object using the tokeniser name
          tokenizer = BertTokenizer.from_pretrained(
              "bert-base-uncased", do_lower_case=True
          )
      self.tokenizer = tokenizer
  
      if type(self.tokenizer) == BertWordPieceTokenizer:
          self.tokenizer.cls_token_id = self.tokenizer.token_to_id(
              "[CLS]"
          )
          self.tokenizer.pad_token_id = self.tokenizer.token_to_id(
              "[PAD]"
          )
  
      self.max_seq_length = max_seq_length
      self.batch_size_per_gpu = batch_size_per_gpu
      self.device = device
      if data_dir:
          self.data_dir = data_dir
          self.cache_dir = data_dir / "lm_cache"
          # Create folder if it doesn't exist
          self.cache_dir.mkdir(exist_ok=True)
          self.no_cache = no_cache
          if clear_cache:
              shutil.rmtree(self.cache_dir, ignore_errors=True)
      else:
          self.no_cache = True
          self.data_dir = None
  
      self.model_type = model_type
      if logger is None:
          logger = logging.getLogger()
      self.logger = logger
      self.n_gpu = 1
      if multi_gpu:
          self.n_gpu = torch.cuda.device_count()
  
      # get dataset
      if self.data_dir:
          dataset = SummarizationDataset(self.data_dir)
      elif test_data:
          dataset = SummarizationInMemoryDataset(test_data)
      else:
          dataset = None
  
      if dataset:
          sampler = SequentialSampler(dataset)
  
          collate_fn = lambda data: collate(
              data,
              self.tokenizer,
              block_size=self.max_seq_length,
              device=self.device,
          )
  
          self.test_dl = DataLoader(
              dataset,
              sampler=sampler,
              batch_size=self.batch_size_per_gpu,
              collate_fn=collate_fn,
          )
      else:
          self.test_dl = None
  
imports: import re
  import html
  import logging
  import pandas
  import os
  import random
  import torch
  from pathlib import Path
  import pickle
  import shutil
  from collections import deque, namedtuple
  from torch.utils.data import Dataset, DataLoader, SequentialSampler
  from tokenizers import BertWordPieceTokenizer
  from transformers import BertTokenizer
label_desc: Use image node_id 1 to create a new BertAbsDataBunch object from inherited base classes: object with example: obj = BertAbsDataBunch(tokenizer, device, data_dir, test_data, batch_size_per_gpu, max_seq_length, multi_gpu, multi_label, model_type, logger, clear_cache, no_cache)