code: def _set_attr(self, attr):
          
          if attr in text:
              self._text_attr(attr)
          elif attr in colors["foreground"]:
              self._color_attr("foreground", attr)
          elif attr in colors["background"]:
              self._color_attr("background", attr)
docs: Given some text attribute, set the current cursor attributes 
          appropriately.