Replaced decode_text(text, encoding) with text.decode(encoding).