code: def stylize(text, styles, reset=True):
      
      terminator = attr("reset") if reset else ""
      return "{}{}{}".format("".join(styles), text, terminator)
docs: conveniently styles your text as and resets ANSI codes at its end.