def transform_inventory_targeting_from_dfp(targeting):
    if not targeting:
        return None

    include_list = []

    placement_ids = targeting.get('targetedPlacementIds', [])
    for pl_id in placement_ids:
        place = Placement(id=pl_id)
        include_list.append(place)

    ad_units = targeting.get('targetedAdUnits', [])
    for au in ad_units:
        include_list.append(_adunit_from_dfp(au))

    exclude_list = []
    ad_units = targeting.get('excludedAdUnits', [])
    for au in ad_units:
        exclude_list.append(_adunit_from_dfp(au))

    return _make_criterion_from_lists(include_list, exclude_list)
Returns a brush for the color.
dataset/ETHPy150Open chartbeat-labs/parselmouth/parselmouth/adapters/dfp/targeting_utils.py/transform_inventory_targeting_from_dfp--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/frontend/qt/console/pygments_highlighter.py/PygmentsHighlighter._get_brush