def _adunit_from_dfp(adunit):
    include_descendants = adunit.get('includeDescendants', False)

    return AdUnit(
        id=adunit['adUnitId'],
        include_descendants=include_descendants,
    )
Convert dfp dictionary to AdUnit targeting model
dataset/ETHPy150Open chartbeat-labs/parselmouth/parselmouth/adapters/dfp/targeting_utils.py/_adunit_from_dfp