code: def test_imgur5k_dataset(
      input_size, num_samples, rotate, recognition, mock_imgur5k
  ):
      ds = datasets.IMGUR5K(
          *mock_imgur5k,
          train=True,
          img_transforms=Resize(input_size),
          use_polygons=rotate,
          recognition_task=recognition,
      )
  
      assert (
          len(ds) == num_samples - 1
      )  # -1 because of the test set 90 / 10 split
      assert repr(ds) == f"IMGUR5K(train={True})"
      if recognition:
          _validate_dataset_recognition_part(ds, input_size)
      else:
          _validate_dataset(ds, input_size, is_polygons=rotate)
  
imports: import os
  from shutil import move
  import numpy
  import pytest
  import torch
  from torch.utils.data import DataLoader, RandomSampler
  from doctr import datasets
  from doctr.file_utils import CLASS_NAME
  from doctr.transforms import Resize
label_desc: Use image node_id 12 for calling a global function with example usage: test_imgur5k_dataset(input_size, num_samples, rotate, recognition, mock_imgur5k) without return types