code: def remove_control_chars(self):
          
          esc_key = Literal('\x1b')
          integer = Word(nums)
          escape_seq = Combine(
              esc_key + '[' + Optional(delimitedList(integer, ';')) +
              oneOf(list(alphas)))
  
          return Suppress(escape_seq).transformString(self.string)
docs: Removes controls chars from text
      
          :return: input except controls chars