<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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