Script Request: Check if CCS Prompting/Requires Reboot on EP

The Procedure to check whether the endpoint require Reboot or not? does not capture that an EP is requiring and/or prompting for a reboot after a CCS install or update.

Therefore can we have a script to check for this - with the usual alert function so that it can be included in a custom monitor?