def _parse(el):
    """Generic response parser."""

    type = 'string'
    if el.attributes and 'type' in list(el.attributes.keys()):
        type = el.attributes['type'].value
    elif _types in el.localName:
        type = el.localName
    elif len(el.childNodes) > 1:
        # This is a container, find the child type
        type = None
        ch = el.firstChild
        while ch and not type:
            if ch.localName == 'type':
                type = ch.firstChild.data
            ch = ch.nextSibling

    if not type:
        raise Exception("Can't parse %s, known: %s"
                        % (el.toxml(), repr(list(_types.keys()))))

    return _types[type](el)
dataset/ETHPy150Open dustin/py-github/github/github.py/_parse/swapped operands of `in`