code: def _init_dataloader(
      imdir: PurePath, recursive: bool
  ) -> torch.utils.data.DataLoader:
      cnn = CNN()
      dataloader = img_dataloader(
          image_dir=imdir,
          batch_size=TEST_BATCH_SIZE,
          basenet_preprocess=cnn.apply_preprocess,
          recursive=recursive,
          num_workers=0,
      )
      return dataloader
  
file_path: imagededup/tests/test_data_generator.py
imports: from pathlib import Path, PurePath
  from typing import List, Tuple
  import torch
  from imagededup.methods import CNN
  from imagededup.utils.data_generator import img_dataloader
label_desc: Use image node_id 1 for calling a global function with example usage: _init_dataloader(imdir, recursive) and returns: dataloader