def process(self, data):
        """Process the data and return its transformed state.

        A cache for the data transformation is created and an internal
        method is run to quickly encode or decode the given bytes. The
        cache is finally converted to immutable bytes when returned."""
        cache = bytearray()
        self._run(data, cache.append, self.__key, self.__into, self.__index)
        return bytes(cache)
Process the data and return its transformed state.

        A cache for the data transformation is created and an internal
        method is run to quickly encode or decode the given bytes. The
        cache is finally converted to immutable bytes when returned.
recipes/Python/578075_Markov_Encryption_Module/recipe-578075.py