def get_contents(clips: set, **kwargs) -> dict:
    """
    Return dictionary of category:clips (key:value) pairs from a set of Clips.\n
    - "count=True" returns number of clips instead of a list of Clips.
    """
    contents = {}
    for clip in clips:
        category = clip.category
        if kwargs.get("count", False):
            contents[category] = contents.get(category, 0) + 1
        else:
            if category in contents:
                contents[category].append(clip)
            else:
                contents[category] = [clip]
    return contents