code: def _setup_network():
      
      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
docs: Setup platform specific network settings