def METHOD_NAME(wrapper: MessageDispatcher, message: str):
    """Give a random totem to a player."""
    var = wrapper.game_state
    totem_types = list(TOTEMS[wrapper.source].keys())
    totem, target = get_totem_target(var, wrapper, message, LASTGIVEN, []) # don't pass totem_types so they can't autocomplete what random totems they have
    if not target:
        return
    # get the first totem type they haven't fully given out yet
    for type in totem_types:
        given = len(SHAMANS[wrapper.source][type])
        total = TOTEMS[wrapper.source][type]
        if given < total:
            totem = type
            break
    else: # all totems are given out, change targets for a random one
        totem = random.choice(totem_types)
    orig_target = target
    target = RETARGET[wrapper.source].get(target, target)
    if target in itertools.chain.from_iterable(SHAMANS[wrapper.source].values()):
        wrapper.send(messages["shaman_no_stacking"].format(orig_target))
        return
    given = give_totem(var, wrapper, target, totem, key="shaman_success_night_unknown", role="crazed shaman")
    if given:
        victim, target = given
        if victim is not target:
            RETARGET[wrapper.source][target] = victim
        SHAMANS[wrapper.source][totem].append(victim)
        if len(SHAMANS[wrapper.source][totem]) > TOTEMS[wrapper.source][totem]:
            SHAMANS[wrapper.source][totem].pop(0)