@staticmethod
    def dictify_permission(entity):
        if not entity:
            return
        output = {}
        if entity.tag == 'flags':
            for prop in entity:
                output[prop.attrib['type']] = prop.attrib['value']
        else:
            for prop in entity:
                output[int(prop.attrib['id'])] = XMLParser.dictify_access_flag(prop)
        return output
Check round-trip processing of content-properties
dataset/ETHPy150Open MediaMath/t1-python/terminalone/xmlparser.py/XMLParser.dictify_permission--crossover with--dataset/ETHPy150Open veegee/amqpy/amqpy/tests/test_basic_message.py/TestBasicMessage.test_roundtrip