nodes: 0, module; 1, function_definition; 2, function_name:_sort; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, expression_statement; 8, comment:"""sort sprites by z_order"""; 9, assignment; 10, subscript; 11, call; 12, attribute; 13, string; 14, identifier:sorted; 15, argument_list; 16, identifier:self; 17, identifier:__dict__; 18, string_content:_z_ordered_sprites; 19, attribute; 20, keyword_argument; 21, identifier:self; 22, identifier:sprites; 23, identifier:key; 24, lambda; 25, lambda_parameters; 26, attribute; 27, identifier:sprite; 28, identifier:sprite; 29, identifier:z_order
code: def _sort(self):
          """sort sprites by z_order"""
          self.__dict__['_z_ordered_sprites'] = sorted(self.sprites, key=lambda sprite:sprite.z_order)