nodes: 0, module; 1, function_definition; 2, function_name:resolve_colors; 3, parameters; 4, block; 5, identifier:self; 6, identifier:colorstack; 7, expression_statement; 8, expression_statement; 9, for_statement; 10, return_statement; 11, string; 12, assignment; 13, identifier:coloropt; 14, identifier:colorstack; 15, block; 16, identifier:attr; 17, string_content:Returns the curses attribute for the colorstack, a list of color option names sorted highest-precedence color first.; 18, identifier:attr; 19, call; 20, expression_statement; 21, expression_statement; 22, identifier:CursesAttr; 23, argument_list; 24, assignment; 25, assignment; 26, identifier:c; 27, call; 28, identifier:attr; 29, call; 30, attribute; 31, argument_list; 32, attribute; 33, argument_list; 34, identifier:self; 35, identifier:get_color; 36, identifier:coloropt; 37, identifier:attr; 38, identifier:update_attr; 39, identifier:c
code: def resolve_colors(self, colorstack):
          'Returns the curses attribute for the colorstack, a list of color option names sorted highest-precedence color first.'
          attr = CursesAttr()
          for coloropt in colorstack:
              c = self.get_color(coloropt)
              attr = attr.update_attr(c)
          return attr