code: def generate_files(
      image_dir: Union[PurePath, str], recursive: bool
  ) -> List:
      if recursive:
          glob_pattern = "**/*"
      else:
          glob_pattern = "*"
  
      return [
          i.absolute()
          for i in Path(image_dir).glob(glob_pattern)
          if not (i.name.startswith(".") or i.is_dir())
      ]
  
file_path: imagededup/imagededup/utils/general_utils.py
imports: import json
  from multiprocessing import Pool
  from pathlib import Path, PurePath
  from typing import Callable, Dict, List, Union
  import tqdm
  from imagededup.utils.logger import return_logger
label_desc: Use image node_id 4 for calling a global function with example usage: generate_files(image_dir, recursive) and returns: unknown