nodes: 0, module; 1, function_definition; 2, function_name:set_item; 3, parameters; 4, block; 5, identifier:self; 6, identifier:key; 7, identifier:value; 8, expression_statement; 9, expression_statement; 10, comment:# if it exists, update; 11, if_statement; 12, comment:"""
          Sets the item by key, and refills the table sorted.
          """; 13, assignment; 14, comparison_operator:key in keys; 15, block; 16, comment:# otherwise we have to add an element; 17, else_clause; 18, identifier:keys; 19, call; 20, identifier:key; 21, identifier:keys; 22, expression_statement; 23, block; 24, identifier:list; 25, argument_list; 26, call; 27, expression_statement; 28, expression_statement; 29, call; 30, attribute; 31, argument_list; 32, call; 33, call; 34, attribute; 35, argument_list; 36, identifier:self; 37, identifier:set_value; 38, integer:1; 39, call; 40, call; 41, attribute; 42, argument_list; 43, attribute; 44, argument_list; 45, identifier:self; 46, identifier:keys; 47, attribute; 48, argument_list; 49, identifier:str; 50, argument_list; 51, identifier:self; 52, identifier:set_value; 53, integer:0; 54, call; 55, call; 56, identifier:self; 57, identifier:set_value; 58, integer:1; 59, binary_operator:len(self)-1; 60, call; 61, identifier:keys; 62, identifier:index; 63, identifier:key; 64, identifier:value; 65, identifier:len; 66, argument_list; 67, identifier:str; 68, argument_list; 69, call; 70, integer:1; 71, identifier:str; 72, argument_list; 73, identifier:self; 74, identifier:key; 75, identifier:len; 76, argument_list; 77, identifier:value; 78, identifier:self
code: def set_item(self, key, value):
          """
          Sets the item by key, and refills the table sorted.
          """
          keys = list(self.keys())
  
          # if it exists, update
          if key in keys:
              self.set_value(1,keys.index(key),str(value))
  
          # otherwise we have to add an element
          else:
              self.set_value(0,len(self),   str(key))
              self.set_value(1,len(self)-1, str(value))