nodes: 0, module; 1, function_definition; 2, function_name:sort; 3, parameters; 4, block; 5, identifier:transactions; 6, expression_statement; 7, return_statement; 8, comment:""" Return a list of sorted transactions by date. """; 9, subscript; 10, call; 11, slice; 12, attribute; 13, argument_list; 14, identifier:transactions; 15, identifier:sort; 16, keyword_argument; 17, identifier:key; 18, lambda; 19, lambda_parameters; 20, call; 21, identifier:x; 22, attribute; 23, argument_list; 24, attribute; 25, identifier:strptime; 26, subscript; 27, string; 28, identifier:datetime; 29, identifier:datetime; 30, call; 31, integer:0; 32, string_content:%Y-%m-%d; 33, attribute; 34, argument_list; 35, identifier:x; 36, identifier:split; 37, string; 38, string_content::
code: def sort(transactions):
      """ Return a list of sorted transactions by date. """
      return transactions.sort(key=lambda x: datetime.datetime.strptime(x.split(':')[0], '%Y-%m-%d'))[:]