advanced programming techniques this text filter is not transformer because rather than transforming the text it is givenit simply returns count of the specified characters that occur in the text here is an example of usevowel_counter charcounter(vowel_counter("dog fish and cat fish""aeiou"returns two other text filters are providedboth of which are transformersrunlengthencode and runlengthdecode here is how they are usedrle_encoder runlengthencode(rle_text rle_encoder(textrle_decoder runlengthdecode(original_text rle_decoder(rle_textthe run length encoder converts string into utf- encoded bytesand replaces bytes with the sequence and any sequence of three to repeated bytes with the sequence countbyte if the string has lots of runs of four or more identical consecutive characters this can produce shorter byte string than the raw utf- encoded bytes the run length decoder takes run length encoded byte string and returns the original string here is the start of the runlengthdecode classclass runlengthdecode(textfilter)@property def is_transformer(self)return true def __call__(selfrle_bytes)we have omitted the body of the __call__(methodalthough it is in the source that accompanies this book the runlengthencode class has exactly the same structure the last abc we will look at provides an application programming interface (apiand default implementation for an undo mechanism here is the complete abc (from file abstract py)class undo(metaclass=abc abcmeta)@abc abstractmethod def __init__(self)self __undos [