Xiao ESP32-C3 GPIO sleep mode

For example, how about the following example that sleeps if the input is LOW?

if(INPUTPIN == LOW) {
 esp_deep_sleep_start();
}