<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _wifi_connect():
 """Connects to WIFI"""

    if not wlan.isconnected():
        wlan.active(True)
        print("NETWORK: connecting to network %s..." % settings.WIFI_SSID)
        wlan.connect(settings.WIFI_SSID, secret)
        while not wlan.isconnected():
            print("NETWORK: waiting for connection...")
            utime.sleep(1)
        print("NETWORK: Connected, network config: %s" % repr(wlan.ifconfig()))