code: def _decode_key(self, key):
          
          bkey = codecs.decode(key.encode(self._keyencoding), 'hex_codec')
          return bkey.decode(self._keyencoding) if self._serialize else bkey
docs: Decode key using hex_codec to retrieve the original key.
  
          Keys are returned as :class:`str` if serialization is enabled.
          Keys are returned as :class:`bytes` if serialization is disabled.