def METHOD_NAME(data, tz=None):
    if isinstance(data, (list, tuple)):
        data = '; '.join(data)
    elif isinstance(data, set):
        data = '; '.join(sorted(data, key=str.lower))
    elif is_lazy_string(data) or isinstance(data, Markup):
        data = str(data)
    elif isinstance(data, datetime):
        data = format_datetime(data, timezone=tz)
    return data