def METHOD_NAME(self, key, count=None):
    if count is None:
        if not key.value:
            return None
        else:
            return random.sample(list(key.value), 1)[0]
    elif count >= 0:
        count = min(count, len(key.value))
        return random.sample(list(key.value), count)
    else:
        items = list(key.value)
        return [random.choice(items) for _ in range(-count)]