nodes: 0, module; 1, function_definition; 2, function_name:compare_variables; 3, parameters; 4, block; 5, identifier:tree_model; 6, identifier:iter1; 7, identifier:iter2; 8, default_parameter; 9, expression_statement; 10, expression_statement; 11, expression_statement; 12, comment:# get key of first variable; 13, expression_statement; 14, comment:# get key of second variable; 15, expression_statement; 16, expression_statement; 17, expression_statement; 18, if_statement; 19, identifier:user_data; 20, None; 21, comment:"""Triggered upon updating the list of global variables
  
          Helper method to sort global variables alphabetically.
  
          :param tree_model: Tree model implementing the Gtk.TreeSortable interface.
          :param iter1: Points at a row.
          :param iter2: Points at a row.
          """; 22, assignment; 23, assignment; 24, assignment; 25, assignment; 26, assignment; 27, assignment; 28, comparison_operator:name1_as_bits == name2_as_bits; 29, block; 30, elif_clause; 31, else_clause; 32, identifier:path1; 33, subscript; 34, identifier:path2; 35, subscript; 36, identifier:name1; 37, subscript; 38, identifier:name2; 39, subscript; 40, identifier:name1_as_bits; 41, call; 42, identifier:name2_as_bits; 43, call; 44, identifier:name1_as_bits; 45, identifier:name2_as_bits; 46, return_statement; 47, comparison_operator:name1_as_bits > name2_as_bits; 48, block; 49, block; 50, call; 51, integer:0; 52, call; 53, integer:0; 54, subscript; 55, integer:0; 56, subscript; 57, integer:0; 58, attribute; 59, generator_expression; 60, attribute; 61, generator_expression; 62, integer:0; 63, identifier:name1_as_bits; 64, identifier:name2_as_bits; 65, return_statement; 66, return_statement; 67, attribute; 68, argument_list; 69, attribute; 70, argument_list; 71, identifier:tree_model; 72, identifier:path1; 73, identifier:tree_model; 74, identifier:path2; 75, string; 76, identifier:join; 77, call; 78, for_in_clause; 79, string; 80, identifier:join; 81, call; 82, for_in_clause; 83, integer:1; 84, unary_operator; 85, identifier:tree_model; 86, identifier:get_path; 87, identifier:iter1; 88, identifier:tree_model; 89, identifier:get_path; 90, identifier:iter2; 91, string_content:; 92, identifier:format; 93, argument_list; 94, identifier:x; 95, identifier:name1; 96, string_content:; 97, identifier:format; 98, argument_list; 99, identifier:x; 100, identifier:name2; 101, integer:1; 102, call; 103, string; 104, call; 105, string; 106, identifier:ord; 107, argument_list; 108, string_content:b; 109, identifier:ord; 110, argument_list; 111, string_content:b; 112, identifier:x; 113, identifier:x
code: def compare_variables(tree_model, iter1, iter2, user_data=None):
          """Triggered upon updating the list of global variables
  
          Helper method to sort global variables alphabetically.
  
          :param tree_model: Tree model implementing the Gtk.TreeSortable interface.
          :param iter1: Points at a row.
          :param iter2: Points at a row.
          """
          path1 = tree_model.get_path(iter1)[0]
          path2 = tree_model.get_path(iter2)[0]
          # get key of first variable
          name1 = tree_model[path1][0]
          # get key of second variable
          name2 = tree_model[path2][0]
          name1_as_bits = ' '.join(format(ord(x), 'b') for x in name1)
          name2_as_bits = ' '.join(format(ord(x), 'b') for x in name2)
          if name1_as_bits == name2_as_bits:
              return 0
          elif name1_as_bits > name2_as_bits:
              return 1
          else:
              return -1