def METHOD_NAME(source_path, dest_path, num=100):
    if not os.path.exists(source_path):
        raise IOError(f"Directory does not exist: {source_path}")
    if not os.path.exists(dest_path):
        os.makedirs(dest_path)  # exist_ok argument does not exist in python 2
    # If SnapshotInfo exists then need to make a new csv for the random image sample
    if os.path.exists(os.path.join(source_path, 'SnapshotInfo.csv')):
        _sample_phenofront(source_path, dest_path, num)
    elif os.path.exists(os.path.join(source_path, 'metadata.json')):
        _sample_phenodata(source_path, dest_path, num)
    else:
        _sample_filenames(source_path, dest_path, num)