import typing
import enum


def _separate(values: typing.Iterable[typing.Any], sep: str = ":") -> str:
    """Separate a sequence by a separator into a single string."""
    parts: typing.List[str] = []
    for value in values:
        if value is None:
            parts.append("null")
        elif isinstance(value, enum.Enum):
            parts.append(str(value.value))
        elif isinstance(value, tuple):
            if value:
                parts.append(_separate(value))  # pyright: ignore[reportUnknownArgumentType]
        else:
            parts.append(str(value))

    return sep.join(parts)