code: def from_string(cls, token_string):
          
          # unhexlify works fine with unicode input in everythin but pypy3, where it Raises "TypeError: 'str' does not support the buffer interface"
          if isinstance(token_string, six.text_type):
              token_string = token_string.encode('ascii')
          # The BOP stores a hex string
          return cls(unhexlify(token_string))
docs: `token_string` should be the string representation from the server.