def loads(s, single=False):
    """
    Deserialize DMRX string representations

    Args:
        s (str): a DMRX string
        single (bool): if `True`, only return the first Xmrs object
    Returns:
        a generator of Xmrs objects (unless *single* is `True`)
    """
    corpus = etree.fromstring(s)
    if single:
        ds = _deserialize_dmrs(next(iter(corpus)))
    else:
        ds = (_deserialize_dmrs(dmrs_elem) for dmrs_elem in corpus)
    return ds
Deserialize DMRX string representations

    Args:
        s (str): a DMRX string
        single (bool): if `True`, only return the first Xmrs object
    Returns:
        a generator of Xmrs objects (unless *single* is `True`)