nodes: 0, module; 1, function_definition; 2, function_name:keys; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, expression_statement; 9, expression_statement; 10, return_statement; 11, identifier:key; 12, None; 13, identifier:reverse; 14, False; 15, comment:"""sort the keys before returning them"""; 16, assignment; 17, identifier:ks; 18, identifier:ks; 19, call; 20, identifier:sorted; 21, argument_list; 22, call; 23, keyword_argument; 24, keyword_argument; 25, identifier:list; 26, argument_list; 27, identifier:key; 28, identifier:key; 29, identifier:reverse; 30, identifier:reverse; 31, call; 32, attribute; 33, argument_list; 34, identifier:dict; 35, identifier:keys; 36, identifier:self
code: def keys(self, key=None, reverse=False):
          """sort the keys before returning them"""
          ks = sorted(list(dict.keys(self)), key=key, reverse=reverse)
          return ks