def METHOD_NAME():
    if not wifi_available:
        return
    # Start connection
    wlan = network.WLAN(network.STA_IF)
    wlan.active(True)
    wlan.connect(WIFI_SSID, WIFI_PASSWORD)
    # Wait for connect success or failure
    max_wait = 100
    while max_wait > 0:
        if wlan.status() < 0 or wlan.status() >= 3:
            break
        max_wait -= 1
        print('waiting for connection...')
        time.sleep(0.2)
        redraw_display_if_reqd()
        cu.update(graphics)
    if max_wait > 0:
        print("Connected")
        try:
            ntptime.settime()
            print("Time set")
        except OSError:
            pass
    wlan.disconnect()
    wlan.active(False)