code: def _validate_dataset_recognition_part(ds, input_size, batch_size=2):
      # Fetch one sample
      img, label = ds[0]
      assert isinstance(img, tf.Tensor)
      assert img.shape == (*input_size, 3)
      assert img.dtype == tf.float32
      assert isinstance(label, str)
  
      # Check batching
      loader = DataLoader(ds, batch_size=batch_size)
  
      images, labels = next(iter(loader))
      assert isinstance(images, tf.Tensor) and images.shape == (
          batch_size,
          *input_size,
          3,
      )
      assert isinstance(labels, list) and all(
          isinstance(elt, str) for elt in labels
      )
  
imports: import os
  from shutil import move
  import numpy
  import pytest
  import tensorflow
  from doctr import datasets
  from doctr.datasets import DataLoader
  from doctr.file_utils import CLASS_NAME
  from doctr.transforms import Resize
label_desc: Use image node_id 2 for calling a global function with example usage: _validate_dataset_recognition_part(ds, input_size, batch_size) without return types