def METHOD_NAME(dir_path: Path, zip_path: Path, remove_source_dir: bool = False) -> None:
    with ZipFile(zip_path, mode="w", compression=ZIP_DEFLATED, compresslevel=2) as zipf:
        len_dir_path = len(str(dir_path))
        for root, _, files in os.walk(dir_path):
            for file in files:
                file_path = os.path.join(root, file)
                zipf.write(file_path, file_path[len_dir_path:])
    if remove_source_dir:
        shutil.rmtree(dir_path)