code: def sort_dict(self, data, key):
      '''Sort a list of dictionaries by dictionary key'''
      return sorted(data, key=itemgetter(key)) if data else [f sort_dict(self, data, key):
      '''Sort a list of dictionaries by dictionary key'''
      return sorted(data, key=itemgetter(key)) if data else []
docs: Sort a list of dictionaries by dictionary key