def to_str(str_or_bytes, encoding='utf-8'):
    """Take argument and return as unicode string.

    :param str_or_bytes: argument to decode.
    :type str_or_bytes: str or bytes
    :param encoding: the encoding to use if argument is of type bytes
    :returns: argument as unicode string.
    :rtype: str
    """
    if isinstance(str_or_bytes, bytes):
        value = str_or_bytes.decode(encoding)
    else:
        value = str_or_bytes
    return value
