Below code will work use it for time being
@staticmethod
    def _parse_token_value(binary_packet):
        token = ""
        token_data = binary_packet.split(b'\x00')
        for split in token_data:
            if split:
                token = split.decode("UTF-8")
        return token