code: def collate_fn(samples):
      images, targets = zip(*samples)
      images = tf.stack(images, axis=0)
  
      return images, tf.convert_to_tensor(targets)
  
file_path: doctr/references/classification/train_tensorflow.py
imports: import os
  import datetime
  import multiprocessing
  import time
  import numpy
  import tensorflow
  from tensorflow.keras import mixed_precision
  from tqdm.auto import tqdm
  from doctr.models import login_to_hub, push_to_hf_hub
  from doctr import transforms
  from doctr.datasets import VOCABS, CharacterGenerator, DataLoader
  from doctr.models import classification
  from doctr.models.utils import export_model_to_onnx
  from utils import EarlyStopper, plot_recorder, plot_samples
label_desc: Use image node_id 4 for calling a global function with example usage: collate_fn(samples) and returns: images,  tf