def loads(s, separator=DEFAULT, index_separator=DEFAULT, cls=dict, list_cls=list):
if isinstance(s, six.text_type):<EOL><INDENT>io = StringIO(s)<EOL><DEDENT>else:<EOL><INDENT>io = BytesIO(s)<EOL><DEDENT>return load(<EOL>fp=io,<EOL>separator=separator,<EOL>index_separator=index_separator,<EOL>cls=cls,<EOL>list_cls=list_cls,<EOL>)<EOL>
Loads an object from a string.

    :param s: An object to parse
    :type s: bytes or str
    :param separator: The separator between key and value.  Defaults to u'|' or b'|', depending on the types.
    :param index_separator: The separator between key and index.  Defaults to u'_' or b'_', depending on the types.
    :param cls: A callable that returns a Mapping that is filled with pairs.  The most common alternate option would be OrderedDict.
    :param list_cls: A callable that takes an iterable and returns a sequence.