code: def strip(self, data, strip_newlines=False):
          
          text = []
          for token_type, tag_name, tag_opts, token_text in self.tokenize(data):
              if token_type == self.TOKEN_DATA:
                  text.append(token_text)
              elif token_type == self.TOKEN_NEWLINE and not strip_newlines:
                  text.append(token_text)
          return ''.join(text)
docs: Strips out any tags from the input text, using the same tokenization as the formatter.