docs: def make_wifi_data(ssid, password, security, hidden=False):
      """\
      Creates WIFI configuration string.
  
      :param str ssid: The SSID of the network.
      :param str|None password: The password.
      :param str|None security: Authentication type; the value should
              be "WEP" or "WPA". Set to ``None`` to omit the value.
              "nopass" is equivalent to setting the value to ``None`` but in
              the former case, the value is not omitted.
      :param bool hidden: Indicates if the network is hidden (default: ``False``)
      :rtype: str
      """
      def quotation_mark(x):
          """\
          Returns '"' if x could be interpreted as hexadecimal value, otherwise
          an empty string.
  
          See: <https://github.com/zxing/zxing/wiki/Barcode-Contents>
          [...] Enclose in double quotes if it is an ASCII name, but could be
          interpreted as hex (i.e. "ABCD") [...]
          """
          try:
              int(x, 16)
          except ValueError:
              return ''
          return '"'
  
      escape = _escape_mecard
      data = 'WIFI:'
      if security:
          data += 'T:{0};'.format(security.upper() if security != 'nopass' else security)
      data += 'S:{1}{0}{1};'.format(escape(ssid), quotation_mark(ssid))
      if password:
          data += 'P:{1}{0}{1};'.format(escape(password), quotation_mark(password))
      data += 'H:true;' if hidden else ';'
      return data