from typing import Any


def unicode(value: Any) -> str:
    """Convert a value to a string.

    This function, is essentially a wrapper for the built-in `str` function,
    with one difference - if the argument is wither `bytes` or `bytearray`, then
    it will be properly "decoded" (using "latin-1" encoding).

    :param value: Value to be converted to a string.
    :return: String representation of the value.
    """
    if isinstance(value, (bytes, bytearray)):
        value = value.decode("latin-1")
    if not isinstance(value, str):
        value = str(value)
    return value