code: def add_text(self, value):
          
          if isinstance(value, (list, tuple)):
              self.pieces.extend(value)
          else:
              self.pieces.append(value)
docs: Adds text corresponding to `value` into `self.pieces`.