Micro:bit Deep Sleep Function

Hey there! I am coding a project using the blocks (pictures attached below) editor that uses the Sparkfun Weatherbit, soil moisture sensor, and a soil temperature sensor. My plan is to use the Microbit data logger function to log data from the Weatherbit and its extensions every 30 minutes. However, the Microbit and the Weatherbit will be powered on for a long period of time and the soil moisture sensor that I am planning to use will corrode quickly as power is continuously flowing through the sensor. So, I asked the Sparkfun community forum and they told me to use the deep sleep functions in the link below:

I am planning to use the power.deep_sleep() function so that the microbit can wake up every 30 minutes.
This website only states how to use these functions in the Python editor, and I have no experience using Python. Because of this, I do not know which part of my code I should modify and where in the Python editor I should put the power.deep_sleep() function.

Here are the pictures of my code in the blocks editor:

Can you help me with this?