def get_streams_traffic(stream_ids: Set[int]) -> Dict[(int, int)]:
    stat = COUNT_STATS['messages_in_stream:is_bot:day']
    traffic_from = (timezone_now() - datetime.timedelta(days=28))
    query = StreamCount.objects.filter(property=stat.property, end_time__gt=traffic_from)
    query = query.filter(stream_id__in=stream_ids)
    traffic_list = query.values('stream_id').annotate(value=Sum('value'))
    traffic_dict = {}
    for traffic in traffic_list:
        traffic_dict[traffic['stream_id']] = traffic['value']
    return traffic_dict
def get_streams_traffic(stream_ids: Set[int]) -> Dict[(int, int)]:
    stat = COUNT_STATS['messages_in_stream:is_bot:day']
    traffic_from = (timezone_now() - datetime.timedelta(days=28))
    query = StreamCount.objects.filter(property=stat.property, end_time__gt=traffic_from)
    query = query.filter(stream_id__in=stream_ids)
    traffic_list = query.values('stream_id').annotate(value=Sum('value'))
    traffic_dict = {}
    for traffic in traffic_list:
        traffic_dict[traffic['stream_id']] = traffic['value']
    return traffic_dict