def METHOD_NAME(
    project: Project,
    *,
    metadata: ExtractedMetadata,
    assets_dir: Path,
) -> None:
    """Look for icons files and update project.
    Existing icon in snap/gui/icon.{png,svg} has precedence over extracted data
    """
    icon_files = (f"{assets_dir}/gui/icon.{ext}" for ext in _VALID_ICON_EXTENSIONS)
    for icon_file in icon_files:
        if Path(icon_file).is_file():
            break
    else:
        if metadata.icon:
            project.icon = metadata.icon
    emit.debug(f"updated project icon: {project.icon}")