

def transform_geography_targeting_to_dfp(targeting):
    '\n    Convert geography targeting model to dfp dictionary\n\n    @param adunit: TargetingCriterion\n    @return: dict\n    '
    included_locations = []
    excluded_locations = []
    (includes, excludes) = targeting.get_includes_and_excludes()
    for i in includes:
        if isinstance(i, Geography):
            includes.append(_geo_to_dfp(i))
    for e in excludes:
        if isinstance(e, Geography):
            excluded_locations.append(_geo_to_dfp(e))
    target_dict = {
        
    }
    if included_locations:
        target_dict['targetedLocations'] = included_locations
    if excluded_locations:
        target_dict['excludedLocations'] = excluded_locations
    return target_dict

dataset/ETHPy150Open chartbeat-labs/parselmouth/parselmouth/adapters/dfp/targeting_utils.py transform_geography_targeting_to_dfp/VarMisuse@51/121 `included_locations`->`includes`