def anonymize_dicom_folder(in_path: Path_Str, out_path: Path_Str, debug: bool=False, **kwargs):
    'Anonymize dicom files in `in_path`, if `in_path` doesn\'t\n    contain dicom files, will do nothing. Debug == True will do\n    sort of dry run to check if all good for the large data storages\n\n    Args:\n        in_path (Path_Str): path to the folder containing dicom files\n        out_path (Path_Str): path to the folder there anonymized copies\n        will be saved\n        debuf (bool): if true, will do a "dry" run\n    '
    in_path = to_Path(in_path)
    try_valid_dir(in_path)
    out_path = to_Path(out_path)
    out_path.mkdir(parents=True, exist_ok=True)
    logger.info(f'Processing: {in_path}')
    in_files = [p for p in in_path.iterdir() if p.is_file()]
    if (not in_files):
        logger.info(f"Folder {in_path} doesn't have dicom files, skip.")
        return
    if debug:
        f_in = random.choice(in_files)
        f_out = (out_path / f_in.name)
        try:
            anonymize_dicom_file(f_in, f_out)
        except Exception as e:
            logger.info(f_in)
            logger.exception(e)
            raise e
    else:
        for f_in in in_files:
            f_out = (out_path / f_in.name)
            try:
                anonymize_dicom_file(f_in, f_out, **kwargs)
            except Exception as e:
                logger.info(f_in)
                logger.exception(e)
                raise e
Anonymize dicom files in `in_path`, if `in_path` doesn't
contain dicom files, will do nothing. Debug == True will do
sort of dry run to check if all good for the large data storages

Args:
    in_path (Path_Str): path to the folder containing dicom files
    out_path (Path_Str): path to the folder there anonymized copies
    will be saved
    debuf (bool): if true, will do a "dry" run
def anonymize_dicom_folder(in_path: Path_Str, out_path: Path_Str, debug: bool=False, **kwargs):
    'Anonymize dicom files in `in_path`, if `in_path` doesn\'t\n    contain dicom files, will do nothing. Debug == True will do\n    sort of dry run to check if all good for the large data storages\n\n    Args:\n        in_path (Path_Str): path to the folder containing dicom files\n        out_path (Path_Str): path to the folder there anonymized copies\n        will be saved\n        debuf (bool): if true, will do a "dry" run\n    '
    in_path = to_Path(in_path)
    try_valid_dir(in_path)
    out_path = to_Path(out_path)
    out_path.mkdir(parents=True, exist_ok=True)
    logger.info(f'Processing: {in_path}')
    in_files = [p for p in in_path.iterdir() if p.is_file()]
    if (not in_files):
        logger.info(f"Folder {in_path} doesn't have dicom files, skip.")
        return
    if debug:
        f_in = random.choice(in_files)
        f_out = (out_path / f_in.name)
        try:
            anonymize_dicom_file(f_in, f_out)
        except Exception as e:
            logger.info(f_in)
            logger.exception(e)
            raise e
    else:
        for f_in in in_files:
            f_out = (out_path / f_in.name)
            try:
                anonymize_dicom_file(f_in, f_out, **kwargs)
            except Exception as e:
                logger.info(f_in)
                logger.exception(e)
                raise e