def _copy_image(input_dir, output_dir, filename):
    """Copies an image from the input directory to the output directory."""
    source = os.path.join(input_dir, filename)
    target = os.path.join(output_dir, filename)
    _ensure_dir(target)
    shutil.copyfile(source, target)
Copies an image from the input directory to the output directory.
lightly/data/dataset.py