[docs]defstr_decode(str_bytes:bytes,encoding:None|str=None)->str:"""Decode to string from bytes. Args: str_bytes (bytes): Bytes to decode. encoding (None | str): Encoding to use. Defaults to None which is equivalent to sys.getdefaultencoding(). Returns: str: Decoded string. """ifencodingisNone:encoding=sys.getdefaultencoding()returnstr_bytes.decode(encoding)