docs: def loads(s, object_pairs_hook=dict):
      """
      Parse the contents of the string ``s`` as a simple line-oriented
      ``.properties`` file and return a `dict` of the key-value pairs.
  
      ``s`` may be either a text string or bytes string.  If it is a bytes
      string, its contents are decoded as Latin-1.
  
      By default, the key-value pairs extracted from ``s`` are combined into a
      `dict` with later occurrences of a key overriding previous occurrences of
      the same key.  To change this behavior, pass a callable as the
      ``object_pairs_hook`` argument; it will be called with one argument, a
      generator of ``(key, value)`` pairs representing the key-value entries in
      ``s`` (including duplicates) in order of occurrence.  `loads` will then
      return the value returned by ``object_pairs_hook``.
  
      .. versionchanged:: 0.5.0
          Invalid ``\\uXXXX`` escape sequences will now cause an
          `InvalidUEscapeError` to be raised
  
      :param string s: the string from which to read the ``.properties`` document
      :param callable object_pairs_hook: class or function for combining the
          key-value pairs
      :rtype: `dict` of text strings or the return value of ``object_pairs_hook``
      :raises InvalidUEscapeError: if an invalid ``\\uXXXX`` escape sequence
          occurs in the input
      """
      fp = BytesIO(s) if isinstance(s, binary_type) else StringIO(s)
      return load(fp, object_pairs_hook=object_pairs_hook)