def METHOD_NAME():
    for package_dir in patch_dir.iterdir():
        if package_dir.is_dir():
            if (metadata_path := package_dir / 'metadata.toml').is_file():
                with open(metadata_path, 'rb') as f:
                    metadata = tomli.load(f)
                    validate_metadata(package_dir, metadata)
            else:
                assert False, f"Patch directory without metadata: {package_dir}"