def METHOD_NAME(
    self, name: str, version: Version, extras: list[str] | None = None
) -> Package:
    canonicalized_name = canonicalize_name(name)
    for METHOD_NAME in self.packages:
        if canonicalized_name == METHOD_NAME.name and METHOD_NAME.version == version:
            return METHOD_NAME
    raise PackageNotFound(f"Package {name} ({version}) not found.")