def bytes2str(bites: bytes, encoding: str = "utf-8") -> str:
    """Convert bytes to a string

    :param bites: bytes
    :type bites: bytes
    :param encoding: encoding of the string (default is utf-8)
    :type encoding: str
    :return: converted bytes
    :rtype: str


    .. doctest:: python

        >>> a = b'abcdefg'
        >>> type(a)
        <class 'bytes'>
        >>> bytes2str(a)
        'abcdefg'
        >>> type(bytes2str(a))
        <class 'str'>

    """
    return bites.decode(encoding)