def METHOD_NAME(self, event: GroupEvent) -> Release | None:
    environment_id = None if self.rule is None else self.rule.environment_id
    cache_key = get_project_release_cache_key(event.group.project_id, environment_id)
    latest_release = cache.get(cache_key)
    if latest_release is None:
        organization_id = event.group.project.organization_id
        environments = None
        if environment_id:
            environments = [Environment.objects.get(id=environment_id)]
        try:
            latest_release_versions = METHOD_NAME(
                [event.group.project],
                environments,
                organization_id,
            )
        except Release.DoesNotExist:
            return None
        latest_releases = list(
            Release.objects.filter(
                version=latest_release_versions[0], organization_id=organization_id
            )
        )
        if latest_releases:
            cache.set(cache_key, latest_releases[0], 600)
            return latest_releases[0]
        else:
            cache.set(cache_key, False, 600)
    return latest_release