Function to check network availability

In order to do specific operations, such as turning off some features and showing status, we need to determine whether the network is available.

Does Cadence have a function to monitor network availability for transactions and queries?