code: def punctuate(current_text, new_text, add_punctuation):
      
      if add_punctuation and current_text and not current_text[-1] in string.punctuation:
          current_text += '. '
      spacer = ' ' if not current_text or (not current_text[-1].isspace() and not new_text[0].isspace()) else ''
      return current_text + spacer + new_text
docs: Add punctuation as needed