from typing import Iterable
from typing import Any
from typing import Callable


def serialize_multi(
    value: Iterable[Any], serialize: Callable[[Any], str], separator: str = ";"
) -> str:
    """Serialize a list or set of values into a string.

    Each value is serialized with the ``serializer`` and the values are joined with the ``separator``.

    Args:
        value (Iterable[Any]): the list or set of values to serialize
        serialize (Callable[[Any], str]): the serializer to use for single values
        separator (str, optional): the seperator to use between values. Must not be part of the serialized values! Defaults to ";".

    Returns:
        str: the string of serialized items.
    """
    return separator.join(serialize(val) for val in value)