code: def parse_www_authenticate_header(value, on_update=None):
      
      if not value:
          return WWWAuthenticate(on_update=on_update)
      try:
          auth_type, auth_info = value.split(None, 1)
          auth_type = auth_type.lower()
      except (ValueError, AttributeError):
          return WWWAuthenticate(value.strip().lower(), on_update=on_update)
      return WWWAuthenticate(auth_type, parse_dict_header(auth_info), on_update)
docs: Parse an HTTP WWW-Authenticate header into a
      :class:`~werkzeug.datastructures.WWWAuthenticate` object.
  
      :param value: a WWW-Authenticate header to parse.
      :param on_update: an optional callable that is called every time a value
                        on the :class:`~werkzeug.datastructures.WWWAuthenticate`
                        object is changed.
      :return: a :class:`~werkzeug.datastructures.WWWAuthenticate` object.