def _get_route_table_vpn_cidrs(route_table, vpn_gateway, vpn_connections):
    static_cidrs = [route['destination_cidr_block']
                    for route in route_table['routes']
                    if route.get('gateway_id') == vpn_gateway['id']]
    is_propagation_enabled = (
        vpn_gateway['id'] in route_table.get('propagating_gateways', []))
    vpn_cidrs = {}
    for vpn in vpn_connections:
        if is_propagation_enabled:
            cidrs = list(set(static_cidrs + vpn['cidrs']))
        else:
            cidrs = static_cidrs
        if cidrs:
            vpn_cidrs[vpn['id']] = cidrs
    return vpn_cidrs
dataset/ETHPy150Open openstack/ec2-api/ec2api/api/vpn_connection.py/_get_route_table_vpn_cidrs/original