def to_unicode(obj: object, encoding: str) ->str:
    """Return unicode representation of an object.

    Returns:

        str: unicoce string object representation

    """
    if isinstance(obj, str):
        return obj
    return bytes(obj).decode(encoding)
