<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _setup_network():
 """Setup platform specific network settings"""

    global wlan
    global secret

    if sys.platform in PYCOM:
        # Update secret as tuple with wlan mode for PyCom port.
        wlan = network.WLAN(network.WLAN.STA)
        secret = (network.WLAN.WPA2, settings.WIFI_PASSWORD)
    else:
        # default micropython wlan settings
        wlan = network.WLAN(network.STA_IF)
        secret = settings.WIFI_PASSWORD