nodes: 0, module; 1, function_definition; 2, function_name:sort_depth; 3, parameters; 4, block; 5, identifier:vals; 6, default_parameter; 7, expression_statement; 8, expression_statement; 9, expression_statement; 10, return_statement; 11, identifier:reverse; 12, False; 13, comment:"""Sort bids or asks by price
          """; 14, assignment; 15, assignment; 16, identifier:lst; 17, identifier:lst; 18, list_comprehension; 19, identifier:lst; 20, call; 21, list; 22, for_in_clause; 23, identifier:sorted; 24, argument_list; 25, call; 26, identifier:quantity; 27, pattern_list; 28, call; 29, identifier:lst; 30, keyword_argument; 31, keyword_argument; 32, identifier:float; 33, argument_list; 34, identifier:price; 35, identifier:quantity; 36, attribute; 37, argument_list; 38, identifier:key; 39, call; 40, identifier:reverse; 41, identifier:reverse; 42, identifier:price; 43, identifier:vals; 44, identifier:items; 45, identifier:itemgetter; 46, argument_list; 47, integer:0
code: def sort_depth(vals, reverse=False):
          """Sort bids or asks by price
          """
          lst = [[float(price), quantity] for price, quantity in vals.items()]
          lst = sorted(lst, key=itemgetter(0), reverse=reverse)
          return lst