async def sort_data(self, data, sort_key, reverse=False):
sorted_data = []<EOL>lines = sorted(data, key=lambda k: k[sort_key], reverse=reverse)<EOL>for line in lines:<EOL><INDENT>sorted_data.append(line)<EOL><DEDENT>return sorted_data<EOL>
Sort dataset.