<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _lxml_el_to_data(lxml_el, ns, nsmap, snake=True):
 """Convert an ``lxml._Element`` instance to a Python tuple."""

    tag_name = _to_colon_ns(lxml_el.tag, default_ns=ns, nsmap=nsmap)
    ret = [tag_name]
    attributes = _get_el_attributes(lxml_el, ns=ns, nsmap=nsmap)
    if attributes:
        ret.append(attributes)
    for sub_el in lxml_el:
        ret.append(_lxml_el_to_data(sub_el, ns, nsmap, snake=snake))
    text = lxml_el.text
    if text:
        ret.append(text)
    return tuple(ret)