def METHOD_NAME(smaps):
    result = {}
    for category in categories:
        result[category] = sum(
            [smap.rss for smap in [x for x in smaps if x.category == category]]
        )
    return result