def find_attr_value_(attr_name, node):
    attrs = node.attrib
    attr_parts = attr_name.split(':')
    value = None
    if len(attr_parts) == 1:
        value = attrs.get(attr_name)
    elif len(attr_parts) == 2:
        prefix, name = attr_parts
        namespace = node.nsmap.get(prefix)
        if namespace is not None:
            value = attrs.get((namespace, name, ) % '{%s}%s')
    return value
dataset/ETHPy150Open iancmcc/ouimeaux/ouimeaux/device/api/xsd/service.py/find_attr_value_/swapped operands of `%`