nodes: 0, module; 1, function_definition; 2, function_name:check; 3, parameters; 4, comment:# pragma: no cover; 5, block; 6, identifier:self; 7, expression_statement; 8, for_statement; 9, comment:"""re-sort any items in self that are not sorted"""; 10, identifier:unsorted; 11, call; 12, block; 13, identifier:iter; 14, generator_expression; 15, expression_statement; 16, subscript; 17, for_in_clause; 18, if_clause; 19, call; 20, identifier:self; 21, identifier:i; 22, identifier:i; 23, call; 24, not_operator; 25, attribute; 26, argument_list; 27, identifier:range; 28, argument_list; 29, call; 30, identifier:self; 31, identifier:resort; 32, identifier:unsorted; 33, binary_operator:len(self) - 2; 34, attribute; 35, argument_list; 36, call; 37, integer:2; 38, identifier:operator; 39, identifier:le; 40, subscript; 41, subscript; 42, identifier:len; 43, argument_list; 44, identifier:self; 45, identifier:i; 46, identifier:self; 47, binary_operator:i + 1; 48, identifier:self; 49, identifier:i; 50, integer:1
code: def check(self):  # pragma: no cover
          """re-sort any items in self that are not sorted"""
          for unsorted in iter(self[i] for i in range(len(self) - 2) if not operator.le(self[i], self[i + 1])):
              self.resort(unsorted)