def METHOD_NAME(
    package_dirs: List[Path], root_dir: Path = ROOT_DIR
) -> None:
    """
        This method updates the `release-please-config.json` file in the directory
        `root_dir`. If `root_dir` is not provided, `google-cloud-python` will be used as the root.
        Args:
            package_dirs(List[pathlib.Path]): A list of Paths, one for each package in
                the `packages/` folder whose entry will be updated in the release-please config.
            root_dir(pathlib.Path): The directory to update the `release-please-config.json`
        Returns:
            None
    """
    release_please_config = root_dir / "release-please-config.json"
    config_json = {"packages": {}}
    for package_dir in package_dirs:
        extra_files: List[Union[str, Dict[str, str]]] = [
            str(file.relative_to(package_dir))
            for file in sorted(package_dir.rglob("**/gapic_version.py"))
        ]
        if len(extra_files) < 1:
            raise Exception("Failed to find gapic_version.py")
        for json_file in sorted(package_dir.glob("samples/**/*.json")):
            sample_json = {}
            sample_json["jsonpath"] = "$.clientLibrary.version"
            sample_json["path"] = str(json_file.relative_to(package_dir))
            sample_json["type"] = "json"
            extra_files.append(sample_json)
        config_json["packages"][f"packages/{package_dir.name}"] = {
            "component": f"{package_dir.name}",
            "release-type": "python",
            "extra-files": extra_files,
            "bump-minor-pre-major": True,
            "bump-patch-for-minor-pre-major": True,
        }
    with open(release_please_config, "w") as f:
        json.dump(config_json, f, indent=4, sort_keys=True)
        f.write("\n")