'Escape a given key bytes with the instance chosen escape method.
Key is not escaped if it contains only \'ASCII printable\' bytes.'

def encode_key(self, key):

    return apply_escape_bytes(key, self._escape, skip_printable=True)
