Load string

def loads(s, cls=None, **kwargs):
    """Load string"""
    if not isinstance(s, string_types):
        raise TypeError('the YAML object must be str, not {0!r}'.format(s.__class__.__name__))

    cls = cls or YAMLDecoder
    return cls(**kwargs).decode(s)