def element_text_getter(missing):
    def _get(v):
        if len(v) > 1:
            return tuple(e.text for e in v)
        elif len(v) == 1:
            return v[0].text
        else:
            return missing
    return _get
dataset/ETHPy150Open alimanfoo/petl/petl/io/xml.py/element_text_getter/original