code: def _build_con_add_cmd(ssid: str, security_type: SECURITY_TYPES,
                         psk: Optional[str], hidden: bool,
                         eap_args: Optional[Dict[str, Any]]) -> List[str]:
      
      configure_cmd = ['connection', 'add',
                       'save', 'yes',
                       'autoconnect', 'yes',
                       'ifname', 'wlan0',
                       'type', 'wifi',
                       'con-name', ssid,
                       'wifi.ssid', ssid]
      if hidden:
          configure_cmd += ['wifi.hidden', 'true']
      if security_type == SECURITY_TYPES.WPA_PSK:
          configure_cmd += ['wifi-sec.key-mgmt', security_type.value]
          if psk is None:
              raise ValueError('wpa-psk security type requires psk')
          configure_cmd += ['wifi-sec.psk', psk]
      elif security_type == SECURITY_TYPES.WPA_EAP:
          if eap_args is None:
              raise ValueError('wpa-eap security type requires eap_args')
          configure_cmd += _add_eap_args(eap_args)
      elif security_type == SECURITY_TYPES.NONE:
          pass
      else:
          raise ValueError("Bad security_type {}".format(security_type))
  
      return configure_cmd
docs: Build the nmcli connection add command to configure the new network.
  
      The parameters are the same as configure but without the defaults; this
      should be called only by configure.