def METHOD_NAME(self) -> bool:
    """Check if system needs to be rebooted."""
    reboot_required = system.should_reboot(
        installed_pkgs=set(self.packages),
        installed_pkgs_regex=set(["linux-.*-realtime"]),
    )
    event.needs_reboot(reboot_required)
    return reboot_required